/*
 * 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.ApiTimeSeriesAggregateStatistics;
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;

/**
 * A single data point of time series data.
 */
@ApiModel(description = "A single data point of time series data.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiTimeSeriesData {
  @SerializedName("timestamp")
  private String timestamp = null;

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

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

  @SerializedName("aggregateStatistics")
  private ApiTimeSeriesAggregateStatistics aggregateStatistics = null;

  public ApiTimeSeriesData timestamp(String timestamp) {
    this.timestamp = timestamp;
    return this;
  }

   /**
   * The timestamp for this time series data point. Note that the timestamp reflects coordinated universal time (UTC) and not necessarily the server&#39;s time zone. The rest API formats the UTC timestamp as an ISO-8061 string.
   * @return timestamp
  **/
  @ApiModelProperty(value = "The timestamp for this time series data point. Note that the timestamp reflects coordinated universal time (UTC) and not necessarily the server's time zone. The rest API formats the UTC timestamp as an ISO-8061 string.")
  public String getTimestamp() {
    return timestamp;
  }

  public void setTimestamp(String timestamp) {
    this.timestamp = timestamp;
  }

  public ApiTimeSeriesData value(BigDecimal value) {
    this.value = value;
    return this;
  }

   /**
   * The value of the time series data.
   * @return value
  **/
  @ApiModelProperty(value = "The value of the time series data.")
  public BigDecimal getValue() {
    return value;
  }

  public void setValue(BigDecimal value) {
    this.value = value;
  }

  public ApiTimeSeriesData type(String type) {
    this.type = type;
    return this;
  }

   /**
   * The type of the time series data.
   * @return type
  **/
  @ApiModelProperty(value = "The type of the time series data.")
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public ApiTimeSeriesData aggregateStatistics(ApiTimeSeriesAggregateStatistics aggregateStatistics) {
    this.aggregateStatistics = aggregateStatistics;
    return this;
  }

   /**
   * Available from v6 for data points containing aggregate data. It includes further statistics about the data point. An aggregate can be across entities (e.g., fd_open_across_datanodes), over time (e.g., a daily point for the fd_open metric for a specific DataNode), or both (e.g., a daily point for the fd_open_across_datanodes metric). If the data point is for non-aggregate date this will return null.
   * @return aggregateStatistics
  **/
  @ApiModelProperty(value = "Available from v6 for data points containing aggregate data. It includes further statistics about the data point. An aggregate can be across entities (e.g., fd_open_across_datanodes), over time (e.g., a daily point for the fd_open metric for a specific DataNode), or both (e.g., a daily point for the fd_open_across_datanodes metric). If the data point is for non-aggregate date this will return null.")
  public ApiTimeSeriesAggregateStatistics getAggregateStatistics() {
    return aggregateStatistics;
  }

  public void setAggregateStatistics(ApiTimeSeriesAggregateStatistics aggregateStatistics) {
    this.aggregateStatistics = aggregateStatistics;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiTimeSeriesData apiTimeSeriesData = (ApiTimeSeriesData) o;
    return Objects.equals(this.timestamp, apiTimeSeriesData.timestamp) &&
        Objects.equals(this.value, apiTimeSeriesData.value) &&
        Objects.equals(this.type, apiTimeSeriesData.type) &&
        Objects.equals(this.aggregateStatistics, apiTimeSeriesData.aggregateStatistics);
  }

  @Override
  public int hashCode() {
    return Objects.hash(timestamp, value, type, aggregateStatistics);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiTimeSeriesData {\n");
    
    sb.append("    timestamp: ").append(toIndentedString(timestamp)).append("\n");
    sb.append("    value: ").append(toIndentedString(value)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    aggregateStatistics: ").append(toIndentedString(aggregateStatistics)).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    ");
  }
  
}

