/*
 * 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.ApiHdfsReplicationCounter;
import com.cloudera.api.swagger.model.ApiHdfsReplicationResult;
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;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Detailed information about an OZONE replication job.
 */
@ApiModel(description = "Detailed information about an OZONE replication job.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiOzoneReplicationResult {
  @SerializedName("progress")
  private java.math.BigDecimal progress = null;

  @SerializedName("throughput")
  private BigDecimal throughput = null;

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

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

  @SerializedName("counters")
  private List<ApiHdfsReplicationCounter> counters = null;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @SerializedName("snapshottedDirs")
  private List<String> snapshottedDirs = null;

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

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

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

  @SerializedName("failedFiles")
  private List<String> failedFiles = null;

  public ApiOzoneReplicationResult progress(java.math.BigDecimal progress) {
    this.progress = progress;
    return this;
  }

   /**
   * The file copy progress percentage.
   * @return progress
  **/
  @ApiModelProperty(value = "The file copy progress percentage.")
  public java.math.BigDecimal getProgress() {
    return progress;
  }

  public void setProgress(java.math.BigDecimal progress) {
    this.progress = progress;
  }

  public ApiOzoneReplicationResult throughput(BigDecimal throughput) {
    this.throughput = throughput;
    return this;
  }

   /**
   * The data throughput in KB/s.
   * @return throughput
  **/
  @ApiModelProperty(value = "The data throughput in KB/s.")
  public BigDecimal getThroughput() {
    return throughput;
  }

  public void setThroughput(BigDecimal throughput) {
    this.throughput = throughput;
  }

  public ApiOzoneReplicationResult remainingTime(java.math.BigDecimal remainingTime) {
    this.remainingTime = remainingTime;
    return this;
  }

   /**
   * The time remaining for mapper phase (seconds).
   * @return remainingTime
  **/
  @ApiModelProperty(value = "The time remaining for mapper phase (seconds).")
  public java.math.BigDecimal getRemainingTime() {
    return remainingTime;
  }

  public void setRemainingTime(java.math.BigDecimal remainingTime) {
    this.remainingTime = remainingTime;
  }

  public ApiOzoneReplicationResult estimatedCompletionTime(String estimatedCompletionTime) {
    this.estimatedCompletionTime = estimatedCompletionTime;
    return this;
  }

   /**
   * The estimated completion time for the mapper phase.
   * @return estimatedCompletionTime
  **/
  @ApiModelProperty(value = "The estimated completion time for the mapper phase.")
  public String getEstimatedCompletionTime() {
    return estimatedCompletionTime;
  }

  public void setEstimatedCompletionTime(String estimatedCompletionTime) {
    this.estimatedCompletionTime = estimatedCompletionTime;
  }

  public ApiOzoneReplicationResult counters(List<ApiHdfsReplicationCounter> counters) {
    this.counters = counters;
    return this;
  }

  public ApiOzoneReplicationResult addCountersItem(ApiHdfsReplicationCounter countersItem) {
    if (this.counters == null) {
      this.counters = new ArrayList<ApiHdfsReplicationCounter>();
    }
    this.counters.add(countersItem);
    return this;
  }

   /**
   * The counters collected from the replication job. &lt;p/&gt; Starting with API v4, the full list of counters is only available in the full view.
   * @return counters
  **/
  @ApiModelProperty(value = "The counters collected from the replication job. <p/> Starting with API v4, the full list of counters is only available in the full view.")
  public List<ApiHdfsReplicationCounter> getCounters() {
    return counters;
  }

  public void setCounters(List<ApiHdfsReplicationCounter> counters) {
    this.counters = counters;
  }

  public ApiOzoneReplicationResult numFilesDryRun(java.math.BigDecimal numFilesDryRun) {
    this.numFilesDryRun = numFilesDryRun;
    return this;
  }

   /**
   * The number of files found to copy.
   * @return numFilesDryRun
  **/
  @ApiModelProperty(value = "The number of files found to copy.")
  public java.math.BigDecimal getNumFilesDryRun() {
    return numFilesDryRun;
  }

  public void setNumFilesDryRun(java.math.BigDecimal numFilesDryRun) {
    this.numFilesDryRun = numFilesDryRun;
  }

  public ApiOzoneReplicationResult numBytesDryRun(java.math.BigDecimal numBytesDryRun) {
    this.numBytesDryRun = numBytesDryRun;
    return this;
  }

   /**
   * The number of bytes found to copy.
   * @return numBytesDryRun
  **/
  @ApiModelProperty(value = "The number of bytes found to copy.")
  public java.math.BigDecimal getNumBytesDryRun() {
    return numBytesDryRun;
  }

  public void setNumBytesDryRun(java.math.BigDecimal numBytesDryRun) {
    this.numBytesDryRun = numBytesDryRun;
  }

  public ApiOzoneReplicationResult numFilesExpected(java.math.BigDecimal numFilesExpected) {
    this.numFilesExpected = numFilesExpected;
    return this;
  }

   /**
   * The number of files expected to be copied.
   * @return numFilesExpected
  **/
  @ApiModelProperty(value = "The number of files expected to be copied.")
  public java.math.BigDecimal getNumFilesExpected() {
    return numFilesExpected;
  }

  public void setNumFilesExpected(java.math.BigDecimal numFilesExpected) {
    this.numFilesExpected = numFilesExpected;
  }

  public ApiOzoneReplicationResult numBytesExpected(java.math.BigDecimal numBytesExpected) {
    this.numBytesExpected = numBytesExpected;
    return this;
  }

   /**
   * The number of bytes expected to be copied.
   * @return numBytesExpected
  **/
  @ApiModelProperty(value = "The number of bytes expected to be copied.")
  public java.math.BigDecimal getNumBytesExpected() {
    return numBytesExpected;
  }

  public void setNumBytesExpected(java.math.BigDecimal numBytesExpected) {
    this.numBytesExpected = numBytesExpected;
  }

  public ApiOzoneReplicationResult numFilesCopied(java.math.BigDecimal numFilesCopied) {
    this.numFilesCopied = numFilesCopied;
    return this;
  }

   /**
   * The number of files actually copied.
   * @return numFilesCopied
  **/
  @ApiModelProperty(value = "The number of files actually copied.")
  public java.math.BigDecimal getNumFilesCopied() {
    return numFilesCopied;
  }

  public void setNumFilesCopied(java.math.BigDecimal numFilesCopied) {
    this.numFilesCopied = numFilesCopied;
  }

  public ApiOzoneReplicationResult numBytesCopied(java.math.BigDecimal numBytesCopied) {
    this.numBytesCopied = numBytesCopied;
    return this;
  }

   /**
   * The number of bytes actually copied.
   * @return numBytesCopied
  **/
  @ApiModelProperty(value = "The number of bytes actually copied.")
  public java.math.BigDecimal getNumBytesCopied() {
    return numBytesCopied;
  }

  public void setNumBytesCopied(java.math.BigDecimal numBytesCopied) {
    this.numBytesCopied = numBytesCopied;
  }

  public ApiOzoneReplicationResult numFilesSkipped(java.math.BigDecimal numFilesSkipped) {
    this.numFilesSkipped = numFilesSkipped;
    return this;
  }

   /**
   * The number of files that were unchanged and thus skipped during copying.
   * @return numFilesSkipped
  **/
  @ApiModelProperty(value = "The number of files that were unchanged and thus skipped during copying.")
  public java.math.BigDecimal getNumFilesSkipped() {
    return numFilesSkipped;
  }

  public void setNumFilesSkipped(java.math.BigDecimal numFilesSkipped) {
    this.numFilesSkipped = numFilesSkipped;
  }

  public ApiOzoneReplicationResult numBytesSkipped(java.math.BigDecimal numBytesSkipped) {
    this.numBytesSkipped = numBytesSkipped;
    return this;
  }

   /**
   * The aggregate number of bytes in the skipped files.
   * @return numBytesSkipped
  **/
  @ApiModelProperty(value = "The aggregate number of bytes in the skipped files.")
  public java.math.BigDecimal getNumBytesSkipped() {
    return numBytesSkipped;
  }

  public void setNumBytesSkipped(java.math.BigDecimal numBytesSkipped) {
    this.numBytesSkipped = numBytesSkipped;
  }

  public ApiOzoneReplicationResult numFilesDeleted(java.math.BigDecimal numFilesDeleted) {
    this.numFilesDeleted = numFilesDeleted;
    return this;
  }

   /**
   * The number of files deleted since they were present at destination, but missing from source.
   * @return numFilesDeleted
  **/
  @ApiModelProperty(value = "The number of files deleted since they were present at destination, but missing from source.")
  public java.math.BigDecimal getNumFilesDeleted() {
    return numFilesDeleted;
  }

  public void setNumFilesDeleted(java.math.BigDecimal numFilesDeleted) {
    this.numFilesDeleted = numFilesDeleted;
  }

  public ApiOzoneReplicationResult numFilesCopyFailed(java.math.BigDecimal numFilesCopyFailed) {
    this.numFilesCopyFailed = numFilesCopyFailed;
    return this;
  }

   /**
   * The number of files for which copy failed.
   * @return numFilesCopyFailed
  **/
  @ApiModelProperty(value = "The number of files for which copy failed.")
  public java.math.BigDecimal getNumFilesCopyFailed() {
    return numFilesCopyFailed;
  }

  public void setNumFilesCopyFailed(java.math.BigDecimal numFilesCopyFailed) {
    this.numFilesCopyFailed = numFilesCopyFailed;
  }

  public ApiOzoneReplicationResult numBytesCopyFailed(java.math.BigDecimal numBytesCopyFailed) {
    this.numBytesCopyFailed = numBytesCopyFailed;
    return this;
  }

   /**
   * The aggregate number of bytes in the files for which copy failed.
   * @return numBytesCopyFailed
  **/
  @ApiModelProperty(value = "The aggregate number of bytes in the files for which copy failed.")
  public java.math.BigDecimal getNumBytesCopyFailed() {
    return numBytesCopyFailed;
  }

  public void setNumBytesCopyFailed(java.math.BigDecimal numBytesCopyFailed) {
    this.numBytesCopyFailed = numBytesCopyFailed;
  }

  public ApiOzoneReplicationResult setupError(String setupError) {
    this.setupError = setupError;
    return this;
  }

   /**
   * The error that happened during job setup, if any.
   * @return setupError
  **/
  @ApiModelProperty(value = "The error that happened during job setup, if any.")
  public String getSetupError() {
    return setupError;
  }

  public void setSetupError(String setupError) {
    this.setupError = setupError;
  }

  public ApiOzoneReplicationResult jobId(String jobId) {
    this.jobId = jobId;
    return this;
  }

   /**
   * Read-only. The MapReduce job ID for the replication job. Available since API v4. &lt;p/&gt; This can be used to query information about the replication job from the MapReduce server where it was executed. Refer to the \&quot;/activities\&quot; resource for services for further details.
   * @return jobId
  **/
  @ApiModelProperty(value = "Read-only. The MapReduce job ID for the replication job. Available since API v4. <p/> This can be used to query information about the replication job from the MapReduce server where it was executed. Refer to the \"/activities\" resource for services for further details.")
  public String getJobId() {
    return jobId;
  }

  public void setJobId(String jobId) {
    this.jobId = jobId;
  }

  public ApiOzoneReplicationResult jobDetailsUri(String jobDetailsUri) {
    this.jobDetailsUri = jobDetailsUri;
    return this;
  }

   /**
   * Read-only. The URI (relative to the CM server&#39;s root) where to find the Activity Monitor page for the job. Available since API v4.
   * @return jobDetailsUri
  **/
  @ApiModelProperty(value = "Read-only. The URI (relative to the CM server's root) where to find the Activity Monitor page for the job. Available since API v4.")
  public String getJobDetailsUri() {
    return jobDetailsUri;
  }

  public void setJobDetailsUri(String jobDetailsUri) {
    this.jobDetailsUri = jobDetailsUri;
  }

  public ApiOzoneReplicationResult dryRun(Boolean dryRun) {
    this.dryRun = dryRun;
    return this;
  }

   /**
   * Whether this was a dry run.
   * @return dryRun
  **/
  @ApiModelProperty(value = "Whether this was a dry run.")
  public Boolean getDryRun() {
    return dryRun;
  }

  public void setDryRun(Boolean dryRun) {
    this.dryRun = dryRun;
  }

  public ApiOzoneReplicationResult snapshottedDirs(List<String> snapshottedDirs) {
    this.snapshottedDirs = snapshottedDirs;
    return this;
  }

  public ApiOzoneReplicationResult addSnapshottedDirsItem(String snapshottedDirsItem) {
    if (this.snapshottedDirs == null) {
      this.snapshottedDirs = new ArrayList<String>();
    }
    this.snapshottedDirs.add(snapshottedDirsItem);
    return this;
  }

   /**
   * The list of directories for which snapshots were taken and used as part of this replication.
   * @return snapshottedDirs
  **/
  @ApiModelProperty(value = "The list of directories for which snapshots were taken and used as part of this replication.")
  public List<String> getSnapshottedDirs() {
    return snapshottedDirs;
  }

  public void setSnapshottedDirs(List<String> snapshottedDirs) {
    this.snapshottedDirs = snapshottedDirs;
  }

  public ApiOzoneReplicationResult runAsUser(String runAsUser) {
    this.runAsUser = runAsUser;
    return this;
  }

   /**
   * Returns run-as user name. Available since API v11.
   * @return runAsUser
  **/
  @ApiModelProperty(value = "Returns run-as user name. Available since API v11.")
  public String getRunAsUser() {
    return runAsUser;
  }

  public void setRunAsUser(String runAsUser) {
    this.runAsUser = runAsUser;
  }

  public ApiOzoneReplicationResult runOnSourceAsUser(String runOnSourceAsUser) {
    this.runOnSourceAsUser = runOnSourceAsUser;
    return this;
  }

   /**
   * Returns run-as user name for source cluster. Available since API v18.
   * @return runOnSourceAsUser
  **/
  @ApiModelProperty(value = "Returns run-as user name for source cluster. Available since API v18.")
  public String getRunOnSourceAsUser() {
    return runOnSourceAsUser;
  }

  public void setRunOnSourceAsUser(String runOnSourceAsUser) {
    this.runOnSourceAsUser = runOnSourceAsUser;
  }

  public ApiOzoneReplicationResult logPath(String logPath) {
    this.logPath = logPath;
    return this;
  }

   /**
   * Returns HDFS path of DistCp execution log files. Available since API v33.
   * @return logPath
  **/
  @ApiModelProperty(value = "Returns HDFS path of DistCp execution log files. Available since API v33.")
  public String getLogPath() {
    return logPath;
  }

  public void setLogPath(String logPath) {
    this.logPath = logPath;
  }

  public ApiOzoneReplicationResult failedFiles(List<String> failedFiles) {
    this.failedFiles = failedFiles;
    return this;
  }

  public ApiOzoneReplicationResult addFailedFilesItem(String failedFilesItem) {
    if (this.failedFiles == null) {
      this.failedFiles = new ArrayList<String>();
    }
    this.failedFiles.add(failedFilesItem);
    return this;
  }

   /**
   * The list of files that failed during replication. Available since API v11.
   * @return failedFiles
  **/
  @ApiModelProperty(value = "The list of files that failed during replication. Available since API v11.")
  public List<String> getFailedFiles() {
    return failedFiles;
  }

  public void setFailedFiles(List<String> failedFiles) {
    this.failedFiles = failedFiles;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiOzoneReplicationResult apiOzoneReplicationResult = (ApiOzoneReplicationResult) o;
    return Objects.equals(this.progress, apiOzoneReplicationResult.progress) &&
        Objects.equals(this.throughput, apiOzoneReplicationResult.throughput) &&
        Objects.equals(this.remainingTime, apiOzoneReplicationResult.remainingTime) &&
        Objects.equals(this.estimatedCompletionTime, apiOzoneReplicationResult.estimatedCompletionTime) &&
        Objects.equals(this.counters, apiOzoneReplicationResult.counters) &&
        Objects.equals(this.numFilesDryRun, apiOzoneReplicationResult.numFilesDryRun) &&
        Objects.equals(this.numBytesDryRun, apiOzoneReplicationResult.numBytesDryRun) &&
        Objects.equals(this.numFilesExpected, apiOzoneReplicationResult.numFilesExpected) &&
        Objects.equals(this.numBytesExpected, apiOzoneReplicationResult.numBytesExpected) &&
        Objects.equals(this.numFilesCopied, apiOzoneReplicationResult.numFilesCopied) &&
        Objects.equals(this.numBytesCopied, apiOzoneReplicationResult.numBytesCopied) &&
        Objects.equals(this.numFilesSkipped, apiOzoneReplicationResult.numFilesSkipped) &&
        Objects.equals(this.numBytesSkipped, apiOzoneReplicationResult.numBytesSkipped) &&
        Objects.equals(this.numFilesDeleted, apiOzoneReplicationResult.numFilesDeleted) &&
        Objects.equals(this.numFilesCopyFailed, apiOzoneReplicationResult.numFilesCopyFailed) &&
        Objects.equals(this.numBytesCopyFailed, apiOzoneReplicationResult.numBytesCopyFailed) &&
        Objects.equals(this.setupError, apiOzoneReplicationResult.setupError) &&
        Objects.equals(this.jobId, apiOzoneReplicationResult.jobId) &&
        Objects.equals(this.jobDetailsUri, apiOzoneReplicationResult.jobDetailsUri) &&
        Objects.equals(this.dryRun, apiOzoneReplicationResult.dryRun) &&
        Objects.equals(this.snapshottedDirs, apiOzoneReplicationResult.snapshottedDirs) &&
        Objects.equals(this.runAsUser, apiOzoneReplicationResult.runAsUser) &&
        Objects.equals(this.runOnSourceAsUser, apiOzoneReplicationResult.runOnSourceAsUser) &&
        Objects.equals(this.logPath, apiOzoneReplicationResult.logPath) &&
        Objects.equals(this.failedFiles, apiOzoneReplicationResult.failedFiles);
  }

  @Override
  public int hashCode() {
    return Objects.hash(progress, throughput, remainingTime, estimatedCompletionTime, counters, numFilesDryRun, numBytesDryRun, numFilesExpected, numBytesExpected, numFilesCopied, numBytesCopied, numFilesSkipped, numBytesSkipped, numFilesDeleted, numFilesCopyFailed, numBytesCopyFailed, setupError, jobId, jobDetailsUri, dryRun, snapshottedDirs, runAsUser, runOnSourceAsUser, logPath, failedFiles);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiOzoneReplicationResult {\n");
    
    sb.append("    progress: ").append(toIndentedString(progress)).append("\n");
    sb.append("    throughput: ").append(toIndentedString(throughput)).append("\n");
    sb.append("    remainingTime: ").append(toIndentedString(remainingTime)).append("\n");
    sb.append("    estimatedCompletionTime: ").append(toIndentedString(estimatedCompletionTime)).append("\n");
    sb.append("    counters: ").append(toIndentedString(counters)).append("\n");
    sb.append("    numFilesDryRun: ").append(toIndentedString(numFilesDryRun)).append("\n");
    sb.append("    numBytesDryRun: ").append(toIndentedString(numBytesDryRun)).append("\n");
    sb.append("    numFilesExpected: ").append(toIndentedString(numFilesExpected)).append("\n");
    sb.append("    numBytesExpected: ").append(toIndentedString(numBytesExpected)).append("\n");
    sb.append("    numFilesCopied: ").append(toIndentedString(numFilesCopied)).append("\n");
    sb.append("    numBytesCopied: ").append(toIndentedString(numBytesCopied)).append("\n");
    sb.append("    numFilesSkipped: ").append(toIndentedString(numFilesSkipped)).append("\n");
    sb.append("    numBytesSkipped: ").append(toIndentedString(numBytesSkipped)).append("\n");
    sb.append("    numFilesDeleted: ").append(toIndentedString(numFilesDeleted)).append("\n");
    sb.append("    numFilesCopyFailed: ").append(toIndentedString(numFilesCopyFailed)).append("\n");
    sb.append("    numBytesCopyFailed: ").append(toIndentedString(numBytesCopyFailed)).append("\n");
    sb.append("    setupError: ").append(toIndentedString(setupError)).append("\n");
    sb.append("    jobId: ").append(toIndentedString(jobId)).append("\n");
    sb.append("    jobDetailsUri: ").append(toIndentedString(jobDetailsUri)).append("\n");
    sb.append("    dryRun: ").append(toIndentedString(dryRun)).append("\n");
    sb.append("    snapshottedDirs: ").append(toIndentedString(snapshottedDirs)).append("\n");
    sb.append("    runAsUser: ").append(toIndentedString(runAsUser)).append("\n");
    sb.append("    runOnSourceAsUser: ").append(toIndentedString(runOnSourceAsUser)).append("\n");
    sb.append("    logPath: ").append(toIndentedString(logPath)).append("\n");
    sb.append("    failedFiles: ").append(toIndentedString(failedFiles)).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    ");
  }
  
}

