/*
 * 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;
/**
 * Rolling upgrade arguments used in the CDH Upgrade Command. Part of ApiCdhUpgradeArgs.
 */
@Schema(description = "Rolling upgrade arguments used in the CDH Upgrade Command. Part of ApiCdhUpgradeArgs.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiRollingUpgradeClusterArgs {
  @SerializedName("slaveBatchSize")
  private java.math.BigDecimal slaveBatchSize = null;

  @SerializedName("sleepSeconds")
  private java.math.BigDecimal sleepSeconds = null;

  @SerializedName("slaveFailCountThreshold")
  private java.math.BigDecimal slaveFailCountThreshold = null;

  public ApiRollingUpgradeClusterArgs slaveBatchSize(java.math.BigDecimal slaveBatchSize) {
    this.slaveBatchSize = slaveBatchSize;
    return this;
  }

   /**
   * Number of slave roles to restart at a time. Must be greater than zero. Default is 1.  Please note that for HDFS, this number should be less than the replication factor (default 3) to ensure data availability during rolling restart.
   * @return slaveBatchSize
  **/
  @Schema(description = "Number of slave roles to restart at a time. Must be greater than zero. Default is 1.  Please note that for HDFS, this number should be less than the replication factor (default 3) to ensure data availability during rolling restart.")
  public java.math.BigDecimal getSlaveBatchSize() {
    return slaveBatchSize;
  }

  public void setSlaveBatchSize(java.math.BigDecimal slaveBatchSize) {
    this.slaveBatchSize = slaveBatchSize;
  }

  public ApiRollingUpgradeClusterArgs sleepSeconds(java.math.BigDecimal sleepSeconds) {
    this.sleepSeconds = sleepSeconds;
    return this;
  }

   /**
   * Number of seconds to sleep between restarts of slave role batches.  Must be greater than or equal to 0. Default is 0.
   * @return sleepSeconds
  **/
  @Schema(description = "Number of seconds to sleep between restarts of slave role batches.  Must be greater than or equal to 0. Default is 0.")
  public java.math.BigDecimal getSleepSeconds() {
    return sleepSeconds;
  }

  public void setSleepSeconds(java.math.BigDecimal sleepSeconds) {
    this.sleepSeconds = sleepSeconds;
  }

  public ApiRollingUpgradeClusterArgs slaveFailCountThreshold(java.math.BigDecimal slaveFailCountThreshold) {
    this.slaveFailCountThreshold = slaveFailCountThreshold;
    return this;
  }

   /**
   * The threshold for number of slave batches that are allowed to fail to restart before the entire command is considered failed.  Must be greather than or equal to 0. Default is 0. &lt;p&gt; This argument is for ADVANCED users only. &lt;/p&gt;
   * @return slaveFailCountThreshold
  **/
  @Schema(description = "The threshold for number of slave batches that are allowed to fail to restart before the entire command is considered failed.  Must be greather than or equal to 0. Default is 0. <p> This argument is for ADVANCED users only. </p>")
  public java.math.BigDecimal getSlaveFailCountThreshold() {
    return slaveFailCountThreshold;
  }

  public void setSlaveFailCountThreshold(java.math.BigDecimal slaveFailCountThreshold) {
    this.slaveFailCountThreshold = slaveFailCountThreshold;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiRollingUpgradeClusterArgs apiRollingUpgradeClusterArgs = (ApiRollingUpgradeClusterArgs) o;
    return Objects.equals(this.slaveBatchSize, apiRollingUpgradeClusterArgs.slaveBatchSize) &&
        Objects.equals(this.sleepSeconds, apiRollingUpgradeClusterArgs.sleepSeconds) &&
        Objects.equals(this.slaveFailCountThreshold, apiRollingUpgradeClusterArgs.slaveFailCountThreshold);
  }

  @Override
  public int hashCode() {
    return Objects.hash(slaveBatchSize, sleepSeconds, slaveFailCountThreshold);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiRollingUpgradeClusterArgs {\n");
    
    sb.append("    slaveBatchSize: ").append(toIndentedString(slaveBatchSize)).append("\n");
    sb.append("    sleepSeconds: ").append(toIndentedString(sleepSeconds)).append("\n");
    sb.append("    slaveFailCountThreshold: ").append(toIndentedString(slaveFailCountThreshold)).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    ");
  }

}
