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

/**
 * Utilization report information of a Yarn application service.
 */
@ApiModel(description = "Utilization report information of a Yarn application service.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiYarnUtilization {
  @SerializedName("avgCpuUtilization")
  private BigDecimal avgCpuUtilization = null;

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

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

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

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

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

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

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

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

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

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

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

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

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

  @SerializedName("tenantUtilizations")
  private ApiYarnTenantUtilizationList tenantUtilizations = null;

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

  public ApiYarnUtilization avgCpuUtilization(BigDecimal avgCpuUtilization) {
    this.avgCpuUtilization = avgCpuUtilization;
    return this;
  }

   /**
   * Average number of VCores used by YARN applications during the report window.
   * @return avgCpuUtilization
  **/
  @ApiModelProperty(value = "Average number of VCores used by YARN applications during the report window.")
  public BigDecimal getAvgCpuUtilization() {
    return avgCpuUtilization;
  }

  public void setAvgCpuUtilization(BigDecimal avgCpuUtilization) {
    this.avgCpuUtilization = avgCpuUtilization;
  }

  public ApiYarnUtilization maxCpuUtilization(BigDecimal maxCpuUtilization) {
    this.maxCpuUtilization = maxCpuUtilization;
    return this;
  }

   /**
   * Maximum number of VCores used by YARN applications during the report window.
   * @return maxCpuUtilization
  **/
  @ApiModelProperty(value = "Maximum number of VCores used by YARN applications during the report window.")
  public BigDecimal getMaxCpuUtilization() {
    return maxCpuUtilization;
  }

  public void setMaxCpuUtilization(BigDecimal maxCpuUtilization) {
    this.maxCpuUtilization = maxCpuUtilization;
  }

  public ApiYarnUtilization avgCpuDailyPeak(BigDecimal avgCpuDailyPeak) {
    this.avgCpuDailyPeak = avgCpuDailyPeak;
    return this;
  }

   /**
   * Average daily peak VCores used by YARN applications during the report window. The number is computed by first finding the maximum resource consumption per day and then taking their mean.
   * @return avgCpuDailyPeak
  **/
  @ApiModelProperty(value = "Average daily peak VCores used by YARN applications during the report window. The number is computed by first finding the maximum resource consumption per day and then taking their mean.")
  public BigDecimal getAvgCpuDailyPeak() {
    return avgCpuDailyPeak;
  }

  public void setAvgCpuDailyPeak(BigDecimal avgCpuDailyPeak) {
    this.avgCpuDailyPeak = avgCpuDailyPeak;
  }

  public ApiYarnUtilization maxCpuUtilizationTimestampMs(java.math.BigDecimal maxCpuUtilizationTimestampMs) {
    this.maxCpuUtilizationTimestampMs = maxCpuUtilizationTimestampMs;
    return this;
  }

   /**
   * Timestamp corresponds to maximum number of VCores used by YARN applications during the report window.
   * @return maxCpuUtilizationTimestampMs
  **/
  @ApiModelProperty(value = "Timestamp corresponds to maximum number of VCores used by YARN applications during the report window.")
  public java.math.BigDecimal getMaxCpuUtilizationTimestampMs() {
    return maxCpuUtilizationTimestampMs;
  }

  public void setMaxCpuUtilizationTimestampMs(java.math.BigDecimal maxCpuUtilizationTimestampMs) {
    this.maxCpuUtilizationTimestampMs = maxCpuUtilizationTimestampMs;
  }

  public ApiYarnUtilization avgCpuUtilizationPercentage(BigDecimal avgCpuUtilizationPercentage) {
    this.avgCpuUtilizationPercentage = avgCpuUtilizationPercentage;
    return this;
  }

   /**
   * Average percentage of VCores used by YARN applications during the report window.
   * @return avgCpuUtilizationPercentage
  **/
  @ApiModelProperty(value = "Average percentage of VCores used by YARN applications during the report window.")
  public BigDecimal getAvgCpuUtilizationPercentage() {
    return avgCpuUtilizationPercentage;
  }

  public void setAvgCpuUtilizationPercentage(BigDecimal avgCpuUtilizationPercentage) {
    this.avgCpuUtilizationPercentage = avgCpuUtilizationPercentage;
  }

  public ApiYarnUtilization maxCpuUtilizationPercentage(BigDecimal maxCpuUtilizationPercentage) {
    this.maxCpuUtilizationPercentage = maxCpuUtilizationPercentage;
    return this;
  }

   /**
   * Maximum percentage of VCores used by YARN applications during the report window.
   * @return maxCpuUtilizationPercentage
  **/
  @ApiModelProperty(value = "Maximum percentage of VCores used by YARN applications during the report window.")
  public BigDecimal getMaxCpuUtilizationPercentage() {
    return maxCpuUtilizationPercentage;
  }

  public void setMaxCpuUtilizationPercentage(BigDecimal maxCpuUtilizationPercentage) {
    this.maxCpuUtilizationPercentage = maxCpuUtilizationPercentage;
  }

  public ApiYarnUtilization avgCpuDailyPeakPercentage(BigDecimal avgCpuDailyPeakPercentage) {
    this.avgCpuDailyPeakPercentage = avgCpuDailyPeakPercentage;
    return this;
  }

   /**
   * Average daily peak percentage of VCores used by YARN applications during the report window.
   * @return avgCpuDailyPeakPercentage
  **/
  @ApiModelProperty(value = "Average daily peak percentage of VCores used by YARN applications during the report window.")
  public BigDecimal getAvgCpuDailyPeakPercentage() {
    return avgCpuDailyPeakPercentage;
  }

  public void setAvgCpuDailyPeakPercentage(BigDecimal avgCpuDailyPeakPercentage) {
    this.avgCpuDailyPeakPercentage = avgCpuDailyPeakPercentage;
  }

  public ApiYarnUtilization avgMemoryUtilization(BigDecimal avgMemoryUtilization) {
    this.avgMemoryUtilization = avgMemoryUtilization;
    return this;
  }

   /**
   * Average memory used by YARN applications during the report window.
   * @return avgMemoryUtilization
  **/
  @ApiModelProperty(value = "Average memory used by YARN applications during the report window.")
  public BigDecimal getAvgMemoryUtilization() {
    return avgMemoryUtilization;
  }

  public void setAvgMemoryUtilization(BigDecimal avgMemoryUtilization) {
    this.avgMemoryUtilization = avgMemoryUtilization;
  }

  public ApiYarnUtilization maxMemoryUtilization(BigDecimal maxMemoryUtilization) {
    this.maxMemoryUtilization = maxMemoryUtilization;
    return this;
  }

   /**
   * Maximum memory used by YARN applications during the report window.
   * @return maxMemoryUtilization
  **/
  @ApiModelProperty(value = "Maximum memory used by YARN applications during the report window.")
  public BigDecimal getMaxMemoryUtilization() {
    return maxMemoryUtilization;
  }

  public void setMaxMemoryUtilization(BigDecimal maxMemoryUtilization) {
    this.maxMemoryUtilization = maxMemoryUtilization;
  }

  public ApiYarnUtilization avgMemoryDailyPeak(BigDecimal avgMemoryDailyPeak) {
    this.avgMemoryDailyPeak = avgMemoryDailyPeak;
    return this;
  }

   /**
   * Average daily peak memory used by YARN applications during the report window. The number is computed by first finding the maximum resource consumption per day and then taking their mean.
   * @return avgMemoryDailyPeak
  **/
  @ApiModelProperty(value = "Average daily peak memory used by YARN applications during the report window. The number is computed by first finding the maximum resource consumption per day and then taking their mean.")
  public BigDecimal getAvgMemoryDailyPeak() {
    return avgMemoryDailyPeak;
  }

  public void setAvgMemoryDailyPeak(BigDecimal avgMemoryDailyPeak) {
    this.avgMemoryDailyPeak = avgMemoryDailyPeak;
  }

  public ApiYarnUtilization maxMemoryUtilizationTimestampMs(java.math.BigDecimal maxMemoryUtilizationTimestampMs) {
    this.maxMemoryUtilizationTimestampMs = maxMemoryUtilizationTimestampMs;
    return this;
  }

   /**
   * Timestamp corresponds to maximum memory used by YARN applications during the report window.
   * @return maxMemoryUtilizationTimestampMs
  **/
  @ApiModelProperty(value = "Timestamp corresponds to maximum memory used by YARN applications during the report window.")
  public java.math.BigDecimal getMaxMemoryUtilizationTimestampMs() {
    return maxMemoryUtilizationTimestampMs;
  }

  public void setMaxMemoryUtilizationTimestampMs(java.math.BigDecimal maxMemoryUtilizationTimestampMs) {
    this.maxMemoryUtilizationTimestampMs = maxMemoryUtilizationTimestampMs;
  }

  public ApiYarnUtilization avgMemoryUtilizationPercentage(BigDecimal avgMemoryUtilizationPercentage) {
    this.avgMemoryUtilizationPercentage = avgMemoryUtilizationPercentage;
    return this;
  }

   /**
   * Average percentage memory used by YARN applications during the report window.
   * @return avgMemoryUtilizationPercentage
  **/
  @ApiModelProperty(value = "Average percentage memory used by YARN applications during the report window.")
  public BigDecimal getAvgMemoryUtilizationPercentage() {
    return avgMemoryUtilizationPercentage;
  }

  public void setAvgMemoryUtilizationPercentage(BigDecimal avgMemoryUtilizationPercentage) {
    this.avgMemoryUtilizationPercentage = avgMemoryUtilizationPercentage;
  }

  public ApiYarnUtilization maxMemoryUtilizationPercentage(BigDecimal maxMemoryUtilizationPercentage) {
    this.maxMemoryUtilizationPercentage = maxMemoryUtilizationPercentage;
    return this;
  }

   /**
   * Maximum percentage of memory used by YARN applications during the report window.
   * @return maxMemoryUtilizationPercentage
  **/
  @ApiModelProperty(value = "Maximum percentage of memory used by YARN applications during the report window.")
  public BigDecimal getMaxMemoryUtilizationPercentage() {
    return maxMemoryUtilizationPercentage;
  }

  public void setMaxMemoryUtilizationPercentage(BigDecimal maxMemoryUtilizationPercentage) {
    this.maxMemoryUtilizationPercentage = maxMemoryUtilizationPercentage;
  }

  public ApiYarnUtilization avgMemoryDailyPeakPercentage(BigDecimal avgMemoryDailyPeakPercentage) {
    this.avgMemoryDailyPeakPercentage = avgMemoryDailyPeakPercentage;
    return this;
  }

   /**
   * Average daily peak percentage of memory used by YARN applications during the report window.
   * @return avgMemoryDailyPeakPercentage
  **/
  @ApiModelProperty(value = "Average daily peak percentage of memory used by YARN applications during the report window.")
  public BigDecimal getAvgMemoryDailyPeakPercentage() {
    return avgMemoryDailyPeakPercentage;
  }

  public void setAvgMemoryDailyPeakPercentage(BigDecimal avgMemoryDailyPeakPercentage) {
    this.avgMemoryDailyPeakPercentage = avgMemoryDailyPeakPercentage;
  }

  public ApiYarnUtilization tenantUtilizations(ApiYarnTenantUtilizationList tenantUtilizations) {
    this.tenantUtilizations = tenantUtilizations;
    return this;
  }

   /**
   * A list of tenant utilization reports.
   * @return tenantUtilizations
  **/
  @ApiModelProperty(value = "A list of tenant utilization reports.")
  public ApiYarnTenantUtilizationList getTenantUtilizations() {
    return tenantUtilizations;
  }

  public void setTenantUtilizations(ApiYarnTenantUtilizationList tenantUtilizations) {
    this.tenantUtilizations = tenantUtilizations;
  }

  public ApiYarnUtilization errorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
    return this;
  }

   /**
   * error message of utilization report.
   * @return errorMessage
  **/
  @ApiModelProperty(value = "error message of utilization report.")
  public String getErrorMessage() {
    return errorMessage;
  }

  public void setErrorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiYarnUtilization apiYarnUtilization = (ApiYarnUtilization) o;
    return Objects.equals(this.avgCpuUtilization, apiYarnUtilization.avgCpuUtilization) &&
        Objects.equals(this.maxCpuUtilization, apiYarnUtilization.maxCpuUtilization) &&
        Objects.equals(this.avgCpuDailyPeak, apiYarnUtilization.avgCpuDailyPeak) &&
        Objects.equals(this.maxCpuUtilizationTimestampMs, apiYarnUtilization.maxCpuUtilizationTimestampMs) &&
        Objects.equals(this.avgCpuUtilizationPercentage, apiYarnUtilization.avgCpuUtilizationPercentage) &&
        Objects.equals(this.maxCpuUtilizationPercentage, apiYarnUtilization.maxCpuUtilizationPercentage) &&
        Objects.equals(this.avgCpuDailyPeakPercentage, apiYarnUtilization.avgCpuDailyPeakPercentage) &&
        Objects.equals(this.avgMemoryUtilization, apiYarnUtilization.avgMemoryUtilization) &&
        Objects.equals(this.maxMemoryUtilization, apiYarnUtilization.maxMemoryUtilization) &&
        Objects.equals(this.avgMemoryDailyPeak, apiYarnUtilization.avgMemoryDailyPeak) &&
        Objects.equals(this.maxMemoryUtilizationTimestampMs, apiYarnUtilization.maxMemoryUtilizationTimestampMs) &&
        Objects.equals(this.avgMemoryUtilizationPercentage, apiYarnUtilization.avgMemoryUtilizationPercentage) &&
        Objects.equals(this.maxMemoryUtilizationPercentage, apiYarnUtilization.maxMemoryUtilizationPercentage) &&
        Objects.equals(this.avgMemoryDailyPeakPercentage, apiYarnUtilization.avgMemoryDailyPeakPercentage) &&
        Objects.equals(this.tenantUtilizations, apiYarnUtilization.tenantUtilizations) &&
        Objects.equals(this.errorMessage, apiYarnUtilization.errorMessage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(avgCpuUtilization, maxCpuUtilization, avgCpuDailyPeak, maxCpuUtilizationTimestampMs, avgCpuUtilizationPercentage, maxCpuUtilizationPercentage, avgCpuDailyPeakPercentage, avgMemoryUtilization, maxMemoryUtilization, avgMemoryDailyPeak, maxMemoryUtilizationTimestampMs, avgMemoryUtilizationPercentage, maxMemoryUtilizationPercentage, avgMemoryDailyPeakPercentage, tenantUtilizations, errorMessage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiYarnUtilization {\n");
    
    sb.append("    avgCpuUtilization: ").append(toIndentedString(avgCpuUtilization)).append("\n");
    sb.append("    maxCpuUtilization: ").append(toIndentedString(maxCpuUtilization)).append("\n");
    sb.append("    avgCpuDailyPeak: ").append(toIndentedString(avgCpuDailyPeak)).append("\n");
    sb.append("    maxCpuUtilizationTimestampMs: ").append(toIndentedString(maxCpuUtilizationTimestampMs)).append("\n");
    sb.append("    avgCpuUtilizationPercentage: ").append(toIndentedString(avgCpuUtilizationPercentage)).append("\n");
    sb.append("    maxCpuUtilizationPercentage: ").append(toIndentedString(maxCpuUtilizationPercentage)).append("\n");
    sb.append("    avgCpuDailyPeakPercentage: ").append(toIndentedString(avgCpuDailyPeakPercentage)).append("\n");
    sb.append("    avgMemoryUtilization: ").append(toIndentedString(avgMemoryUtilization)).append("\n");
    sb.append("    maxMemoryUtilization: ").append(toIndentedString(maxMemoryUtilization)).append("\n");
    sb.append("    avgMemoryDailyPeak: ").append(toIndentedString(avgMemoryDailyPeak)).append("\n");
    sb.append("    maxMemoryUtilizationTimestampMs: ").append(toIndentedString(maxMemoryUtilizationTimestampMs)).append("\n");
    sb.append("    avgMemoryUtilizationPercentage: ").append(toIndentedString(avgMemoryUtilizationPercentage)).append("\n");
    sb.append("    maxMemoryUtilizationPercentage: ").append(toIndentedString(maxMemoryUtilizationPercentage)).append("\n");
    sb.append("    avgMemoryDailyPeakPercentage: ").append(toIndentedString(avgMemoryDailyPeakPercentage)).append("\n");
    sb.append("    tenantUtilizations: ").append(toIndentedString(tenantUtilizations)).append("\n");
    sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).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    ");
  }
  
}

