/*
 * 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;
/**
 * Basic arguments used for Rolling Restart Cluster commands.
 */
@Schema(description = "Basic arguments used for Rolling Restart Cluster commands.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiSimpleRollingRestartClusterArgs {
  @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 ApiSimpleRollingRestartClusterArgs slaveBatchSize(java.math.BigDecimal slaveBatchSize) {
    this.slaveBatchSize = slaveBatchSize;
    return this;
  }

   /**
   * Number of hosts with slave roles to restart at a time. Must be greater than zero. Default is 1.
   * @return slaveBatchSize
  **/
  @Schema(description = "Number of hosts with slave roles to restart at a time. Must be greater than zero. Default is 1.")
  public java.math.BigDecimal getSlaveBatchSize() {
    return slaveBatchSize;
  }

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

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

   /**
   * Number of seconds to sleep between restarts of slave host batches. &lt;p&gt; Must be greater than or equal to 0. Default is 0.
   * @return sleepSeconds
  **/
  @Schema(description = "Number of seconds to sleep between restarts of slave host batches. <p> 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 ApiSimpleRollingRestartClusterArgs slaveFailCountThreshold(java.math.BigDecimal slaveFailCountThreshold) {
    this.slaveFailCountThreshold = slaveFailCountThreshold;
    return this;
  }

   /**
   * The threshold for number of slave host batches that are allowed to fail to restart before the entire command is considered failed. &lt;p&gt; Must be greater 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 host batches that are allowed to fail to restart before the entire command is considered failed. <p> Must be greater 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;
    }
    ApiSimpleRollingRestartClusterArgs apiSimpleRollingRestartClusterArgs = (ApiSimpleRollingRestartClusterArgs) o;
    return Objects.equals(this.slaveBatchSize, apiSimpleRollingRestartClusterArgs.slaveBatchSize) &&
        Objects.equals(this.sleepSeconds, apiSimpleRollingRestartClusterArgs.sleepSeconds) &&
        Objects.equals(this.slaveFailCountThreshold, apiSimpleRollingRestartClusterArgs.slaveFailCountThreshold);
  }

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


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiSimpleRollingRestartClusterArgs {\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    ");
  }

}
