/*
 * 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.ApiHive3ReplicationMetric;
import com.cloudera.api.swagger.model.ApiHive3ReplicationMetricsStatus;
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;
/**
 * ApiHive3ReplicationMetricsStage
 */

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiHive3ReplicationMetricsStage {
  @SerializedName("name")
  private String name = null;

  @SerializedName("status")
  private ApiHive3ReplicationMetricsStatus status = null;

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

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

  @SerializedName("metrics")
  private List<ApiHive3ReplicationMetric> metrics = null;

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

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

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

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

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

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

  public ApiHive3ReplicationMetricsStage name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @Schema(description = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public ApiHive3ReplicationMetricsStage status(ApiHive3ReplicationMetricsStatus status) {
    this.status = status;
    return this;
  }

   /**
   * Get status
   * @return status
  **/
  @Schema(description = "")
  public ApiHive3ReplicationMetricsStatus getStatus() {
    return status;
  }

  public void setStatus(ApiHive3ReplicationMetricsStatus status) {
    this.status = status;
  }

  public ApiHive3ReplicationMetricsStage startDate(String startDate) {
    this.startDate = startDate;
    return this;
  }

   /**
   * Get startDate
   * @return startDate
  **/
  @Schema(description = "")
  public String getStartDate() {
    return startDate;
  }

  public void setStartDate(String startDate) {
    this.startDate = startDate;
  }

  public ApiHive3ReplicationMetricsStage endDate(String endDate) {
    this.endDate = endDate;
    return this;
  }

   /**
   * Get endDate
   * @return endDate
  **/
  @Schema(description = "")
  public String getEndDate() {
    return endDate;
  }

  public void setEndDate(String endDate) {
    this.endDate = endDate;
  }

  public ApiHive3ReplicationMetricsStage metrics(List<ApiHive3ReplicationMetric> metrics) {
    this.metrics = metrics;
    return this;
  }

  public ApiHive3ReplicationMetricsStage addMetricsItem(ApiHive3ReplicationMetric metricsItem) {
    if (this.metrics == null) {
      this.metrics = new ArrayList<>();
    }
    this.metrics.add(metricsItem);
    return this;
  }

   /**
   * Get metrics
   * @return metrics
  **/
  @Schema(description = "")
  public List<ApiHive3ReplicationMetric> getMetrics() {
    return metrics;
  }

  public void setMetrics(List<ApiHive3ReplicationMetric> metrics) {
    this.metrics = metrics;
  }

  public ApiHive3ReplicationMetricsStage errorLogPath(String errorLogPath) {
    this.errorLogPath = errorLogPath;
    return this;
  }

   /**
   * Get errorLogPath
   * @return errorLogPath
  **/
  @Schema(description = "")
  public String getErrorLogPath() {
    return errorLogPath;
  }

  public void setErrorLogPath(String errorLogPath) {
    this.errorLogPath = errorLogPath;
  }

  public ApiHive3ReplicationMetricsStage oldestOpenTxnTimestampAtBegin(java.math.BigDecimal oldestOpenTxnTimestampAtBegin) {
    this.oldestOpenTxnTimestampAtBegin = oldestOpenTxnTimestampAtBegin;
    return this;
  }

   /**
   * Get oldestOpenTxnTimestampAtBegin
   * @return oldestOpenTxnTimestampAtBegin
  **/
  @Schema(required = true, description = "")
  public java.math.BigDecimal getOldestOpenTxnTimestampAtBegin() {
    return oldestOpenTxnTimestampAtBegin;
  }

  public void setOldestOpenTxnTimestampAtBegin(java.math.BigDecimal oldestOpenTxnTimestampAtBegin) {
    this.oldestOpenTxnTimestampAtBegin = oldestOpenTxnTimestampAtBegin;
  }

  public ApiHive3ReplicationMetricsStage oldestOpenTxnTimestampAtEnd(java.math.BigDecimal oldestOpenTxnTimestampAtEnd) {
    this.oldestOpenTxnTimestampAtEnd = oldestOpenTxnTimestampAtEnd;
    return this;
  }

   /**
   * Get oldestOpenTxnTimestampAtEnd
   * @return oldestOpenTxnTimestampAtEnd
  **/
  @Schema(required = true, description = "")
  public java.math.BigDecimal getOldestOpenTxnTimestampAtEnd() {
    return oldestOpenTxnTimestampAtEnd;
  }

  public void setOldestOpenTxnTimestampAtEnd(java.math.BigDecimal oldestOpenTxnTimestampAtEnd) {
    this.oldestOpenTxnTimestampAtEnd = oldestOpenTxnTimestampAtEnd;
  }

  public ApiHive3ReplicationMetricsStage endDateOnSrc(String endDateOnSrc) {
    this.endDateOnSrc = endDateOnSrc;
    return this;
  }

   /**
   * Get endDateOnSrc
   * @return endDateOnSrc
  **/
  @Schema(description = "")
  public String getEndDateOnSrc() {
    return endDateOnSrc;
  }

  public void setEndDateOnSrc(String endDateOnSrc) {
    this.endDateOnSrc = endDateOnSrc;
  }

  public ApiHive3ReplicationMetricsStage endDateOnTgt(String endDateOnTgt) {
    this.endDateOnTgt = endDateOnTgt;
    return this;
  }

   /**
   * Get endDateOnTgt
   * @return endDateOnTgt
  **/
  @Schema(description = "")
  public String getEndDateOnTgt() {
    return endDateOnTgt;
  }

  public void setEndDateOnTgt(String endDateOnTgt) {
    this.endDateOnTgt = endDateOnTgt;
  }

  public ApiHive3ReplicationMetricsStage lastSuccessfulDumpId(java.math.BigDecimal lastSuccessfulDumpId) {
    this.lastSuccessfulDumpId = lastSuccessfulDumpId;
    return this;
  }

   /**
   * Get lastSuccessfulDumpId
   * @return lastSuccessfulDumpId
  **/
  @Schema(description = "")
  public java.math.BigDecimal getLastSuccessfulDumpId() {
    return lastSuccessfulDumpId;
  }

  public void setLastSuccessfulDumpId(java.math.BigDecimal lastSuccessfulDumpId) {
    this.lastSuccessfulDumpId = lastSuccessfulDumpId;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiHive3ReplicationMetricsStage apiHive3ReplicationMetricsStage = (ApiHive3ReplicationMetricsStage) o;
    return Objects.equals(this.name, apiHive3ReplicationMetricsStage.name) &&
        Objects.equals(this.status, apiHive3ReplicationMetricsStage.status) &&
        Objects.equals(this.startDate, apiHive3ReplicationMetricsStage.startDate) &&
        Objects.equals(this.endDate, apiHive3ReplicationMetricsStage.endDate) &&
        Objects.equals(this.metrics, apiHive3ReplicationMetricsStage.metrics) &&
        Objects.equals(this.errorLogPath, apiHive3ReplicationMetricsStage.errorLogPath) &&
        Objects.equals(this.oldestOpenTxnTimestampAtBegin, apiHive3ReplicationMetricsStage.oldestOpenTxnTimestampAtBegin) &&
        Objects.equals(this.oldestOpenTxnTimestampAtEnd, apiHive3ReplicationMetricsStage.oldestOpenTxnTimestampAtEnd) &&
        Objects.equals(this.endDateOnSrc, apiHive3ReplicationMetricsStage.endDateOnSrc) &&
        Objects.equals(this.endDateOnTgt, apiHive3ReplicationMetricsStage.endDateOnTgt) &&
        Objects.equals(this.lastSuccessfulDumpId, apiHive3ReplicationMetricsStage.lastSuccessfulDumpId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, status, startDate, endDate, metrics, errorLogPath, oldestOpenTxnTimestampAtBegin, oldestOpenTxnTimestampAtEnd, endDateOnSrc, endDateOnTgt, lastSuccessfulDumpId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiHive3ReplicationMetricsStage {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    metrics: ").append(toIndentedString(metrics)).append("\n");
    sb.append("    errorLogPath: ").append(toIndentedString(errorLogPath)).append("\n");
    sb.append("    oldestOpenTxnTimestampAtBegin: ").append(toIndentedString(oldestOpenTxnTimestampAtBegin)).append("\n");
    sb.append("    oldestOpenTxnTimestampAtEnd: ").append(toIndentedString(oldestOpenTxnTimestampAtEnd)).append("\n");
    sb.append("    endDateOnSrc: ").append(toIndentedString(endDateOnSrc)).append("\n");
    sb.append("    endDateOnTgt: ").append(toIndentedString(endDateOnTgt)).append("\n");
    sb.append("    lastSuccessfulDumpId: ").append(toIndentedString(lastSuccessfulDumpId)).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    ");
  }

}
