content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import java.util.Objects;
  
  /**
   * StandardSyncSummary
   * <p>
   * standard information output by ALL sources for a sync step (our version of state.json)
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "status",
    "recordsSynced",
    "bytesSynced",
    "startTime",
    "endTime",
    "totalStats",
    "streamStats",
    "performanceMetrics",
    "streamCount"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class StandardSyncSummary implements Serializable {
  
    /**
     * ReplicationStatus
     * <p>
     *
     * (Required)
     *
     */
    @JsonProperty("status")
    private ReplicationStatus status;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("recordsSynced")
    private Long recordsSynced;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("bytesSynced")
    private Long bytesSynced;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("startTime")
    private Long startTime;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("endTime")
    private Long endTime;
    /**
     * SyncStats
     * <p>
     * sync stats. (Required)
     *
     */
    @JsonProperty("totalStats")
    @JsonPropertyDescription("sync stats.")
    private SyncStats totalStats;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("streamStats")
    private List<StreamSyncStats> streamStats = new ArrayList<StreamSyncStats>();
    /**
     * PerformanceMetrics
     * <p>
     * A collection of implementation specific performance metrics
     *
     */
    @JsonProperty("performanceMetrics")
    @JsonPropertyDescription("A collection of implementation specific performance metrics")
    private PerformanceMetrics performanceMetrics;
    @JsonProperty("streamCount")
    private Long streamCount;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = -2849571344412189651L;
  
    /**
     * ReplicationStatus
     * <p>
     *
     * (Required)
     *
     */
    @JsonProperty("status")
    public ReplicationStatus getStatus() {
      return status;
    }
  
    /**
     * ReplicationStatus
     * <p>
     *
     * (Required)
     *
     */
    @JsonProperty("status")
    public void setStatus(ReplicationStatus status) {
      this.status = status;
    }
  
    public StandardSyncSummary withStatus(ReplicationStatus status) {
      this.status = status;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("recordsSynced")
    public Long getRecordsSynced() {
      return recordsSynced;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("recordsSynced")
    public void setRecordsSynced(Long recordsSynced) {
      this.recordsSynced = recordsSynced;
    }
  
    public StandardSyncSummary withRecordsSynced(Long recordsSynced) {
      this.recordsSynced = recordsSynced;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("bytesSynced")
    public Long getBytesSynced() {
      return bytesSynced;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("bytesSynced")
    public void setBytesSynced(Long bytesSynced) {
      this.bytesSynced = bytesSynced;
    }
  
    public StandardSyncSummary withBytesSynced(Long bytesSynced) {
      this.bytesSynced = bytesSynced;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("startTime")
    public Long getStartTime() {
      return startTime;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("startTime")
    public void setStartTime(Long startTime) {
      this.startTime = startTime;
    }
  
    public StandardSyncSummary withStartTime(Long startTime) {
      this.startTime = startTime;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("endTime")
    public Long getEndTime() {
      return endTime;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("endTime")
    public void setEndTime(Long endTime) {
      this.endTime = endTime;
    }
  
    public StandardSyncSummary withEndTime(Long endTime) {
      this.endTime = endTime;
      return this;
    }
  
    /**
     * SyncStats
     * <p>
     * sync stats. (Required)
     *
     */
    @JsonProperty("totalStats")
    public SyncStats getTotalStats() {
      return totalStats;
    }
  
    /**
     * SyncStats
     * <p>
     * sync stats. (Required)
     *
     */
    @JsonProperty("totalStats")
    public void setTotalStats(SyncStats totalStats) {
      this.totalStats = totalStats;
    }
  
    public StandardSyncSummary withTotalStats(SyncStats totalStats) {
      this.totalStats = totalStats;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("streamStats")
    public List<StreamSyncStats> getStreamStats() {
      return streamStats;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("streamStats")
    public void setStreamStats(List<StreamSyncStats> streamStats) {
      this.streamStats = streamStats;
    }
  
    public StandardSyncSummary withStreamStats(List<StreamSyncStats> streamStats) {
      this.streamStats = streamStats;
      return this;
    }
  
    /**
     * PerformanceMetrics
     * <p>
     * A collection of implementation specific performance metrics
     *
     */
    @JsonProperty("performanceMetrics")
    public PerformanceMetrics getPerformanceMetrics() {
      return performanceMetrics;
    }
  
    /**
     * PerformanceMetrics
     * <p>
     * A collection of implementation specific performance metrics
     *
     */
    @JsonProperty("performanceMetrics")
    public void setPerformanceMetrics(PerformanceMetrics performanceMetrics) {
      this.performanceMetrics = performanceMetrics;
    }
  
    public StandardSyncSummary withPerformanceMetrics(PerformanceMetrics performanceMetrics) {
      this.performanceMetrics = performanceMetrics;
      return this;
    }
  
    @JsonProperty("streamCount")
    public Long getStreamCount() {
      return streamCount;
    }
  
    @JsonProperty("streamCount")
    public void setStreamCount(Long streamCount) {
      this.streamCount = streamCount;
    }
  
    public StandardSyncSummary withStreamCount(Long streamCount) {
      this.streamCount = streamCount;
      return this;
    }
  
    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
      return this.additionalProperties;
    }
  
    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
    }
  
    public StandardSyncSummary withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(StandardSyncSummary.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("status");
      sb.append('=');
      sb.append(((this.status == null) ? "<null>" : this.status));
      sb.append(',');
      sb.append("recordsSynced");
      sb.append('=');
      sb.append(((this.recordsSynced == null) ? "<null>" : this.recordsSynced));
      sb.append(',');
      sb.append("bytesSynced");
      sb.append('=');
      sb.append(((this.bytesSynced == null) ? "<null>" : this.bytesSynced));
      sb.append(',');
      sb.append("startTime");
      sb.append('=');
      sb.append(((this.startTime == null) ? "<null>" : this.startTime));
      sb.append(',');
      sb.append("endTime");
      sb.append('=');
      sb.append(((this.endTime == null) ? "<null>" : this.endTime));
      sb.append(',');
      sb.append("totalStats");
      sb.append('=');
      sb.append(((this.totalStats == null) ? "<null>" : this.totalStats));
      sb.append(',');
      sb.append("streamStats");
      sb.append('=');
      sb.append(((this.streamStats == null) ? "<null>" : this.streamStats));
      sb.append(',');
      sb.append("performanceMetrics");
      sb.append('=');
      sb.append(((this.performanceMetrics == null) ? "<null>" : this.performanceMetrics));
      sb.append(',');
      sb.append("streamCount");
      sb.append('=');
      sb.append(((this.streamCount == null) ? "<null>" : this.streamCount));
      sb.append(',');
      sb.append("additionalProperties");
      sb.append('=');
      sb.append(((this.additionalProperties == null) ? "<null>" : this.additionalProperties));
      sb.append(',');
      if (sb.charAt((sb.length() - 1)) == ',') {
        sb.setCharAt((sb.length() - 1), ']');
      } else {
        sb.append(']');
      }
      return sb.toString();
    }
  
    @Override
    public int hashCode() {
      int result = 1;
      result = ((result * 31) + ((this.totalStats == null) ? 0 : this.totalStats.hashCode()));
      result = ((result * 31) + ((this.bytesSynced == null) ? 0 : this.bytesSynced.hashCode()));
      result = ((result * 31) + ((this.streamStats == null) ? 0 : this.streamStats.hashCode()));
      result = ((result * 31) + ((this.performanceMetrics == null) ? 0 : this.performanceMetrics.hashCode()));
      result = ((result * 31) + ((this.startTime == null) ? 0 : this.startTime.hashCode()));
      result = ((result * 31) + ((this.endTime == null) ? 0 : this.endTime.hashCode()));
      result = ((result * 31) + ((this.streamCount == null) ? 0 : this.streamCount.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.recordsSynced == null) ? 0 : this.recordsSynced.hashCode()));
      result = ((result * 31) + ((this.status == null) ? 0 : this.status.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof StandardSyncSummary) == false) {
        return false;
      }
      StandardSyncSummary rhs = ((StandardSyncSummary) other);
      return ((((((((((Objects.equals(this.totalStats, rhs.totalStats))
          && ((Objects.equals(this.bytesSynced, rhs.bytesSynced)) || ((this.bytesSynced != null) && this.bytesSynced.equals(rhs.bytesSynced))))
          && (Objects.equals(this.streamStats, rhs.streamStats)))
          && (Objects.equals(this.performanceMetrics, rhs.performanceMetrics)))
          && ((Objects.equals(this.startTime, rhs.startTime)) || ((this.startTime != null) && this.startTime.equals(rhs.startTime))))
          && ((Objects.equals(this.endTime, rhs.endTime)) || ((this.endTime != null) && this.endTime.equals(rhs.endTime))))
          && ((Objects.equals(this.streamCount, rhs.streamCount)) || ((this.streamCount != null) && this.streamCount.equals(rhs.streamCount))))
          && (Objects.equals(this.additionalProperties, rhs.additionalProperties)))
          && ((Objects.equals(this.recordsSynced, rhs.recordsSynced))
              || ((this.recordsSynced != null) && this.recordsSynced.equals(rhs.recordsSynced))))
          && (Objects.equals(this.status, rhs.status)));
    }
  
    /**
     * ReplicationStatus
     * <p>
     *
     *
     */
    public enum ReplicationStatus {
  
      COMPLETED("completed"),
      FAILED("failed"),
      CANCELLED("cancelled");
  
      private final String value;
      private final static Map<String, ReplicationStatus> CONSTANTS = new HashMap<String, ReplicationStatus>();
  
      static {
        for (ReplicationStatus c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      private ReplicationStatus(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static ReplicationStatus fromValue(String value) {
        ReplicationStatus constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
  }
  