/*
 * 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.ApiAtlasReplicationArguments;
import com.cloudera.api.swagger.model.ApiHBaseReplicationArguments;
import com.cloudera.api.swagger.model.ApiHdfsCloudReplicationArguments;
import com.cloudera.api.swagger.model.ApiHdfsReplicationArguments;
import com.cloudera.api.swagger.model.ApiHive3ReplicationArguments;
import com.cloudera.api.swagger.model.ApiHiveCloudReplicationArguments;
import com.cloudera.api.swagger.model.ApiHiveReplicationArguments;
import com.cloudera.api.swagger.model.ApiIcebergReplicationArguments;
import com.cloudera.api.swagger.model.ApiOzoneReplicationArguments;
import com.cloudera.api.swagger.model.ApiRangerReplicationArgs;
import com.cloudera.api.swagger.model.ApiReplicationCommand;
import com.cloudera.api.swagger.model.ApiSchedule;
import com.cloudera.api.swagger.model.ApiScheduleInterval;
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;
/**
 * A replication job schedule. &lt;p/&gt; Replication jobs have service-specific arguments. This object has methods to retrieve arguments for all supported types of replication, but only one argument type is allowed to be set; the backend will check that the provided argument matches the service type where the replication is being scheduled. &lt;p/&gt; The replication job&#x27;s arguments should match the underlying service. Refer to each property&#x27;s documentation to find out which properties correspond to which services.
 */
@Schema(description = "A replication job schedule. <p/> Replication jobs have service-specific arguments. This object has methods to retrieve arguments for all supported types of replication, but only one argument type is allowed to be set; the backend will check that the provided argument matches the service type where the replication is being scheduled. <p/> The replication job's arguments should match the underlying service. Refer to each property's documentation to find out which properties correspond to which services.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiReplicationSchedule extends ApiSchedule {
  @SerializedName("hdfsArguments")
  private ApiHdfsReplicationArguments hdfsArguments = null;

  @SerializedName("hiveArguments")
  private ApiHiveReplicationArguments hiveArguments = null;

  @SerializedName("hdfsCloudArguments")
  private ApiHdfsCloudReplicationArguments hdfsCloudArguments = null;

  @SerializedName("ozoneReplicationArguments")
  private ApiOzoneReplicationArguments ozoneReplicationArguments = null;

  @SerializedName("history")
  private List<ApiReplicationCommand> history = null;

  @SerializedName("active")
  private Boolean active = null;

  @SerializedName("hiveCloudArguments")
  private ApiHiveCloudReplicationArguments hiveCloudArguments = null;

  @SerializedName("hbaseArguments")
  private ApiHBaseReplicationArguments hbaseArguments = null;

  @SerializedName("hive3Arguments")
  private ApiHive3ReplicationArguments hive3Arguments = null;

  @SerializedName("rangerArguments")
  private ApiRangerReplicationArgs rangerArguments = null;

  @SerializedName("icebergArguments")
  private ApiIcebergReplicationArguments icebergArguments = null;

  @SerializedName("atlasReplicationArguments")
  private ApiAtlasReplicationArguments atlasReplicationArguments = null;

  public ApiReplicationSchedule hdfsArguments(ApiHdfsReplicationArguments hdfsArguments) {
    this.hdfsArguments = hdfsArguments;
    return this;
  }

   /**
   * Get hdfsArguments
   * @return hdfsArguments
  **/
  @Schema(description = "")
  public ApiHdfsReplicationArguments getHdfsArguments() {
    return hdfsArguments;
  }

  public void setHdfsArguments(ApiHdfsReplicationArguments hdfsArguments) {
    this.hdfsArguments = hdfsArguments;
  }

  public ApiReplicationSchedule hiveArguments(ApiHiveReplicationArguments hiveArguments) {
    this.hiveArguments = hiveArguments;
    return this;
  }

   /**
   * Get hiveArguments
   * @return hiveArguments
  **/
  @Schema(description = "")
  public ApiHiveReplicationArguments getHiveArguments() {
    return hiveArguments;
  }

  public void setHiveArguments(ApiHiveReplicationArguments hiveArguments) {
    this.hiveArguments = hiveArguments;
  }

  public ApiReplicationSchedule hdfsCloudArguments(ApiHdfsCloudReplicationArguments hdfsCloudArguments) {
    this.hdfsCloudArguments = hdfsCloudArguments;
    return this;
  }

   /**
   * Get hdfsCloudArguments
   * @return hdfsCloudArguments
  **/
  @Schema(description = "")
  public ApiHdfsCloudReplicationArguments getHdfsCloudArguments() {
    return hdfsCloudArguments;
  }

  public void setHdfsCloudArguments(ApiHdfsCloudReplicationArguments hdfsCloudArguments) {
    this.hdfsCloudArguments = hdfsCloudArguments;
  }

  public ApiReplicationSchedule ozoneReplicationArguments(ApiOzoneReplicationArguments ozoneReplicationArguments) {
    this.ozoneReplicationArguments = ozoneReplicationArguments;
    return this;
  }

   /**
   * Get ozoneReplicationArguments
   * @return ozoneReplicationArguments
  **/
  @Schema(description = "")
  public ApiOzoneReplicationArguments getOzoneReplicationArguments() {
    return ozoneReplicationArguments;
  }

  public void setOzoneReplicationArguments(ApiOzoneReplicationArguments ozoneReplicationArguments) {
    this.ozoneReplicationArguments = ozoneReplicationArguments;
  }

  public ApiReplicationSchedule history(List<ApiReplicationCommand> history) {
    this.history = history;
    return this;
  }

  public ApiReplicationSchedule addHistoryItem(ApiReplicationCommand historyItem) {
    if (this.history == null) {
      this.history = new ArrayList<>();
    }
    this.history.add(historyItem);
    return this;
  }

   /**
   * List of active and/or finished commands for this schedule.
   * @return history
  **/
  @Schema(description = "List of active and/or finished commands for this schedule.")
  public List<ApiReplicationCommand> getHistory() {
    return history;
  }

  public void setHistory(List<ApiReplicationCommand> history) {
    this.history = history;
  }

  public ApiReplicationSchedule active(Boolean active) {
    this.active = active;
    return this;
  }

   /**
   * Read-only field that is true if this schedule is currently active, false if not. Available since API v11.
   * @return active
  **/
  @Schema(description = "Read-only field that is true if this schedule is currently active, false if not. Available since API v11.")
  public Boolean isActive() {
    return active;
  }

  public void setActive(Boolean active) {
    this.active = active;
  }

  public ApiReplicationSchedule hiveCloudArguments(ApiHiveCloudReplicationArguments hiveCloudArguments) {
    this.hiveCloudArguments = hiveCloudArguments;
    return this;
  }

   /**
   * Get hiveCloudArguments
   * @return hiveCloudArguments
  **/
  @Schema(description = "")
  public ApiHiveCloudReplicationArguments getHiveCloudArguments() {
    return hiveCloudArguments;
  }

  public void setHiveCloudArguments(ApiHiveCloudReplicationArguments hiveCloudArguments) {
    this.hiveCloudArguments = hiveCloudArguments;
  }

  public ApiReplicationSchedule hbaseArguments(ApiHBaseReplicationArguments hbaseArguments) {
    this.hbaseArguments = hbaseArguments;
    return this;
  }

   /**
   * Get hbaseArguments
   * @return hbaseArguments
  **/
  @Schema(description = "")
  public ApiHBaseReplicationArguments getHbaseArguments() {
    return hbaseArguments;
  }

  public void setHbaseArguments(ApiHBaseReplicationArguments hbaseArguments) {
    this.hbaseArguments = hbaseArguments;
  }

  public ApiReplicationSchedule hive3Arguments(ApiHive3ReplicationArguments hive3Arguments) {
    this.hive3Arguments = hive3Arguments;
    return this;
  }

   /**
   * Get hive3Arguments
   * @return hive3Arguments
  **/
  @Schema(description = "")
  public ApiHive3ReplicationArguments getHive3Arguments() {
    return hive3Arguments;
  }

  public void setHive3Arguments(ApiHive3ReplicationArguments hive3Arguments) {
    this.hive3Arguments = hive3Arguments;
  }

  public ApiReplicationSchedule rangerArguments(ApiRangerReplicationArgs rangerArguments) {
    this.rangerArguments = rangerArguments;
    return this;
  }

   /**
   * Get rangerArguments
   * @return rangerArguments
  **/
  @Schema(description = "")
  public ApiRangerReplicationArgs getRangerArguments() {
    return rangerArguments;
  }

  public void setRangerArguments(ApiRangerReplicationArgs rangerArguments) {
    this.rangerArguments = rangerArguments;
  }

  public ApiReplicationSchedule icebergArguments(ApiIcebergReplicationArguments icebergArguments) {
    this.icebergArguments = icebergArguments;
    return this;
  }

   /**
   * Get icebergArguments
   * @return icebergArguments
  **/
  @Schema(description = "")
  public ApiIcebergReplicationArguments getIcebergArguments() {
    return icebergArguments;
  }

  public void setIcebergArguments(ApiIcebergReplicationArguments icebergArguments) {
    this.icebergArguments = icebergArguments;
  }

  public ApiReplicationSchedule atlasReplicationArguments(ApiAtlasReplicationArguments atlasReplicationArguments) {
    this.atlasReplicationArguments = atlasReplicationArguments;
    return this;
  }

   /**
   * Get atlasReplicationArguments
   * @return atlasReplicationArguments
  **/
  @Schema(description = "")
  public ApiAtlasReplicationArguments getAtlasReplicationArguments() {
    return atlasReplicationArguments;
  }

  public void setAtlasReplicationArguments(ApiAtlasReplicationArguments atlasReplicationArguments) {
    this.atlasReplicationArguments = atlasReplicationArguments;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiReplicationSchedule apiReplicationSchedule = (ApiReplicationSchedule) o;
    return Objects.equals(this.hdfsArguments, apiReplicationSchedule.hdfsArguments) &&
        Objects.equals(this.hiveArguments, apiReplicationSchedule.hiveArguments) &&
        Objects.equals(this.hdfsCloudArguments, apiReplicationSchedule.hdfsCloudArguments) &&
        Objects.equals(this.ozoneReplicationArguments, apiReplicationSchedule.ozoneReplicationArguments) &&
        Objects.equals(this.history, apiReplicationSchedule.history) &&
        Objects.equals(this.active, apiReplicationSchedule.active) &&
        Objects.equals(this.hiveCloudArguments, apiReplicationSchedule.hiveCloudArguments) &&
        Objects.equals(this.hbaseArguments, apiReplicationSchedule.hbaseArguments) &&
        Objects.equals(this.hive3Arguments, apiReplicationSchedule.hive3Arguments) &&
        Objects.equals(this.rangerArguments, apiReplicationSchedule.rangerArguments) &&
        Objects.equals(this.icebergArguments, apiReplicationSchedule.icebergArguments) &&
        Objects.equals(this.atlasReplicationArguments, apiReplicationSchedule.atlasReplicationArguments) &&
        super.equals(o);
  }

  @Override
  public int hashCode() {
    return Objects.hash(hdfsArguments, hiveArguments, hdfsCloudArguments, ozoneReplicationArguments, history, active, hiveCloudArguments, hbaseArguments, hive3Arguments, rangerArguments, icebergArguments, atlasReplicationArguments, super.hashCode());
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiReplicationSchedule {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    hdfsArguments: ").append(toIndentedString(hdfsArguments)).append("\n");
    sb.append("    hiveArguments: ").append(toIndentedString(hiveArguments)).append("\n");
    sb.append("    hdfsCloudArguments: ").append(toIndentedString(hdfsCloudArguments)).append("\n");
    sb.append("    ozoneReplicationArguments: ").append(toIndentedString(ozoneReplicationArguments)).append("\n");
    sb.append("    history: ").append(toIndentedString(history)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).append("\n");
    sb.append("    hiveCloudArguments: ").append(toIndentedString(hiveCloudArguments)).append("\n");
    sb.append("    hbaseArguments: ").append(toIndentedString(hbaseArguments)).append("\n");
    sb.append("    hive3Arguments: ").append(toIndentedString(hive3Arguments)).append("\n");
    sb.append("    rangerArguments: ").append(toIndentedString(rangerArguments)).append("\n");
    sb.append("    icebergArguments: ").append(toIndentedString(icebergArguments)).append("\n");
    sb.append("    atlasReplicationArguments: ").append(toIndentedString(atlasReplicationArguments)).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    ");
  }

}
