/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.8.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 com.cloudera.api.swagger.model.ApiHostRef;
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.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * 
 */
@ApiModel(description = "")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiHostMaintenanceResponse {
  @SerializedName("success")
  private Boolean success = null;

  @SerializedName("hostRef")
  private ApiHostRef hostRef = null;

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

  public ApiHostMaintenanceResponse success(Boolean success) {
    this.success = success;
    return this;
  }

   /**
   * success is true if host enters into maintenance and false otherwise
   * @return success
  **/
  @ApiModelProperty(required = true, value = "success is true if host enters into maintenance and false otherwise")
  public Boolean getSuccess() {
    return success;
  }

  public void setSuccess(Boolean success) {
    this.success = success;
  }

  public ApiHostMaintenanceResponse hostRef(ApiHostRef hostRef) {
    this.hostRef = hostRef;
    return this;
  }

   /**
   * Host ref contains Host Id and Host Name of the host that needs to go into the Maintenance mode
   * @return hostRef
  **/
  @ApiModelProperty(value = "Host ref contains Host Id and Host Name of the host that needs to go into the Maintenance mode")
  public ApiHostRef getHostRef() {
    return hostRef;
  }

  public void setHostRef(ApiHostRef hostRef) {
    this.hostRef = hostRef;
  }

  public ApiHostMaintenanceResponse errorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
    return this;
  }

   /**
   * The error message captures RunTime Exception messages when maintenance mode operation fails to execute on the host.
   * @return errorMessage
  **/
  @ApiModelProperty(value = "The error message captures RunTime Exception messages when maintenance mode operation fails to execute on the host.")
  public String getErrorMessage() {
    return errorMessage;
  }

  public void setErrorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiHostMaintenanceResponse apiHostMaintenanceResponse = (ApiHostMaintenanceResponse) o;
    return Objects.equals(this.success, apiHostMaintenanceResponse.success) &&
        Objects.equals(this.hostRef, apiHostMaintenanceResponse.hostRef) &&
        Objects.equals(this.errorMessage, apiHostMaintenanceResponse.errorMessage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(success, hostRef, errorMessage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiHostMaintenanceResponse {\n");
    
    sb.append("    success: ").append(toIndentedString(success)).append("\n");
    sb.append("    hostRef: ").append(toIndentedString(hostRef)).append("\n");
    sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).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    ");
  }
  
}

