/*
 * 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.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;
/**
 * This is the model for CM server information from v41.  The class models the host environment that CM server is installed. Each CM server instance has an entry of CmServer entity and updates it periodically.
 */
@Schema(description = "This is the model for CM server information from v41.  The class models the host environment that CM server is installed. Each CM server instance has an entry of CmServer entity and updates it periodically.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiCmServer {
  @SerializedName("cmServerId")
  private String cmServerId = null;

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

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

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

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

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

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

  public ApiCmServer cmServerId(String cmServerId) {
    this.cmServerId = cmServerId;
    return this;
  }

   /**
   * The CM server ID.
   * @return cmServerId
  **/
  @Schema(description = "The CM server ID.")
  public String getCmServerId() {
    return cmServerId;
  }

  public void setCmServerId(String cmServerId) {
    this.cmServerId = cmServerId;
  }

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

   /**
   * The CM server hostname.
   * @return name
  **/
  @Schema(description = "The CM server hostname.")
  public String getName() {
    return name;
  }

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

  public ApiCmServer ipAddress(String ipAddress) {
    this.ipAddress = ipAddress;
    return this;
  }

   /**
   * The IP address.
   * @return ipAddress
  **/
  @Schema(description = "The IP address.")
  public String getIpAddress() {
    return ipAddress;
  }

  public void setIpAddress(String ipAddress) {
    this.ipAddress = ipAddress;
  }

  public ApiCmServer createdTime(String createdTime) {
    this.createdTime = createdTime;
    return this;
  }

   /**
   * The created time.
   * @return createdTime
  **/
  @Schema(description = "The created time.")
  public String getCreatedTime() {
    return createdTime;
  }

  public void setCreatedTime(String createdTime) {
    this.createdTime = createdTime;
  }

  public ApiCmServer lastUpdatedTime(String lastUpdatedTime) {
    this.lastUpdatedTime = lastUpdatedTime;
    return this;
  }

   /**
   * The last updated time.
   * @return lastUpdatedTime
  **/
  @Schema(description = "The last updated time.")
  public String getLastUpdatedTime() {
    return lastUpdatedTime;
  }

  public void setLastUpdatedTime(String lastUpdatedTime) {
    this.lastUpdatedTime = lastUpdatedTime;
  }

  public ApiCmServer haPriority(String haPriority) {
    this.haPriority = haPriority;
    return this;
  }

   /**
   * HA Priority for active passive mode.
   * @return haPriority
  **/
  @Schema(description = "HA Priority for active passive mode.")
  public String getHaPriority() {
    return haPriority;
  }

  public void setHaPriority(String haPriority) {
    this.haPriority = haPriority;
  }

  public ApiCmServer isAlive(String isAlive) {
    this.isAlive = isAlive;
    return this;
  }

   /**
   * Is the cm server running.
   * @return isAlive
  **/
  @Schema(description = "Is the cm server running.")
  public String getIsAlive() {
    return isAlive;
  }

  public void setIsAlive(String isAlive) {
    this.isAlive = isAlive;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiCmServer apiCmServer = (ApiCmServer) o;
    return Objects.equals(this.cmServerId, apiCmServer.cmServerId) &&
        Objects.equals(this.name, apiCmServer.name) &&
        Objects.equals(this.ipAddress, apiCmServer.ipAddress) &&
        Objects.equals(this.createdTime, apiCmServer.createdTime) &&
        Objects.equals(this.lastUpdatedTime, apiCmServer.lastUpdatedTime) &&
        Objects.equals(this.haPriority, apiCmServer.haPriority) &&
        Objects.equals(this.isAlive, apiCmServer.isAlive);
  }

  @Override
  public int hashCode() {
    return Objects.hash(cmServerId, name, ipAddress, createdTime, lastUpdatedTime, haPriority, isAlive);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiCmServer {\n");
    
    sb.append("    cmServerId: ").append(toIndentedString(cmServerId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    ipAddress: ").append(toIndentedString(ipAddress)).append("\n");
    sb.append("    createdTime: ").append(toIndentedString(createdTime)).append("\n");
    sb.append("    lastUpdatedTime: ").append(toIndentedString(lastUpdatedTime)).append("\n");
    sb.append("    haPriority: ").append(toIndentedString(haPriority)).append("\n");
    sb.append("    isAlive: ").append(toIndentedString(isAlive)).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    ");
  }

}
