/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.cloudera.api.swagger.model;

import java.util.Objects;
import java.util.Arrays;
import com.cloudera.api.swagger.model.ApiEndPointHost;
import com.cloudera.api.swagger.model.ApiMapEntry;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * This defines a single logical service in the SDX cluster. A single service can expose one or more URLs. This ApiEndPoint groups the URLs logically for configuration, versioning, or any other service specific reason.
 */
@Schema(description = "This defines a single logical service in the SDX cluster. A single service can expose one or more URLs. This ApiEndPoint groups the URLs logically for configuration, versioning, or any other service specific reason.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiEndPoint {
  @SerializedName("name")
  private String name = null;

  @SerializedName("version")
  private String version = null;

  @SerializedName("serviceConfigs")
  private List<ApiMapEntry> serviceConfigs = null;

  @SerializedName("endPointHostList")
  private List<ApiEndPointHost> endPointHostList = null;

  @SerializedName("serviceType")
  private String serviceType = null;

  public ApiEndPoint name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Name for the endPoint.
   * @return name
  **/
  @Schema(description = "Name for the endPoint.")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public ApiEndPoint version(String version) {
    this.version = version;
    return this;
  }

   /**
   * Endpoint specific version.
   * @return version
  **/
  @Schema(description = "Endpoint specific version.")
  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }

  public ApiEndPoint serviceConfigs(List<ApiMapEntry> serviceConfigs) {
    this.serviceConfigs = serviceConfigs;
    return this;
  }

  public ApiEndPoint addServiceConfigsItem(ApiMapEntry serviceConfigsItem) {
    if (this.serviceConfigs == null) {
      this.serviceConfigs = new ArrayList<>();
    }
    this.serviceConfigs.add(serviceConfigsItem);
    return this;
  }

   /**
   * Additional configs for the endPoint.
   * @return serviceConfigs
  **/
  @Schema(description = "Additional configs for the endPoint.")
  public List<ApiMapEntry> getServiceConfigs() {
    return serviceConfigs;
  }

  public void setServiceConfigs(List<ApiMapEntry> serviceConfigs) {
    this.serviceConfigs = serviceConfigs;
  }

  public ApiEndPoint endPointHostList(List<ApiEndPointHost> endPointHostList) {
    this.endPointHostList = endPointHostList;
    return this;
  }

  public ApiEndPoint addEndPointHostListItem(ApiEndPointHost endPointHostListItem) {
    if (this.endPointHostList == null) {
      this.endPointHostList = new ArrayList<>();
    }
    this.endPointHostList.add(endPointHostListItem);
    return this;
  }

   /**
   * List hosts (uris) for this endPoint.
   * @return endPointHostList
  **/
  @Schema(description = "List hosts (uris) for this endPoint.")
  public List<ApiEndPointHost> getEndPointHostList() {
    return endPointHostList;
  }

  public void setEndPointHostList(List<ApiEndPointHost> endPointHostList) {
    this.endPointHostList = endPointHostList;
  }

  public ApiEndPoint serviceType(String serviceType) {
    this.serviceType = serviceType;
    return this;
  }

   /**
   * Endpoint service type.
   * @return serviceType
  **/
  @Schema(description = "Endpoint service type.")
  public String getServiceType() {
    return serviceType;
  }

  public void setServiceType(String serviceType) {
    this.serviceType = serviceType;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiEndPoint apiEndPoint = (ApiEndPoint) o;
    return Objects.equals(this.name, apiEndPoint.name) &&
        Objects.equals(this.version, apiEndPoint.version) &&
        Objects.equals(this.serviceConfigs, apiEndPoint.serviceConfigs) &&
        Objects.equals(this.endPointHostList, apiEndPoint.endPointHostList) &&
        Objects.equals(this.serviceType, apiEndPoint.serviceType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, version, serviceConfigs, endPointHostList, serviceType);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiEndPoint {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    serviceConfigs: ").append(toIndentedString(serviceConfigs)).append("\n");
    sb.append("    endPointHostList: ").append(toIndentedString(endPointHostList)).append("\n");
    sb.append("    serviceType: ").append(toIndentedString(serviceType)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
