/*
 * 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.ApiImpalaUtilizationHistogram;
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 tenant of Impala application.
 */
@ApiModel(description = "Utilization report information of a tenant of Impala application.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiImpalaTenantUtilization {
  @SerializedName("tenantName")
  private String tenantName = null;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @SerializedName("distributionUtilizedByImpalaDaemon")
  private ApiImpalaUtilizationHistogram distributionUtilizedByImpalaDaemon = null;

  @SerializedName("distributionAllocatedByImpalaDaemon")
  private ApiImpalaUtilizationHistogram distributionAllocatedByImpalaDaemon = null;

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

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

  public ApiImpalaTenantUtilization tenantName(String tenantName) {
    this.tenantName = tenantName;
    return this;
  }

   /**
   * Name of the tenant.
   * @return tenantName
  **/
  @ApiModelProperty(value = "Name of the tenant.")
  public String getTenantName() {
    return tenantName;
  }

  public void setTenantName(String tenantName) {
    this.tenantName = tenantName;
  }

  public ApiImpalaTenantUtilization totalQueries(BigDecimal totalQueries) {
    this.totalQueries = totalQueries;
    return this;
  }

   /**
   * Total number of queries submitted to Impala.
   * @return totalQueries
  **/
  @ApiModelProperty(value = "Total number of queries submitted to Impala.")
  public BigDecimal getTotalQueries() {
    return totalQueries;
  }

  public void setTotalQueries(BigDecimal totalQueries) {
    this.totalQueries = totalQueries;
  }

  public ApiImpalaTenantUtilization successfulQueries(BigDecimal successfulQueries) {
    this.successfulQueries = successfulQueries;
    return this;
  }

   /**
   * Number of queries that finished successfully.
   * @return successfulQueries
  **/
  @ApiModelProperty(value = "Number of queries that finished successfully.")
  public BigDecimal getSuccessfulQueries() {
    return successfulQueries;
  }

  public void setSuccessfulQueries(BigDecimal successfulQueries) {
    this.successfulQueries = successfulQueries;
  }

  public ApiImpalaTenantUtilization oomQueries(BigDecimal oomQueries) {
    this.oomQueries = oomQueries;
    return this;
  }

   /**
   * Number of queries that failed due to insufficient memory.
   * @return oomQueries
  **/
  @ApiModelProperty(value = "Number of queries that failed due to insufficient memory.")
  public BigDecimal getOomQueries() {
    return oomQueries;
  }

  public void setOomQueries(BigDecimal oomQueries) {
    this.oomQueries = oomQueries;
  }

  public ApiImpalaTenantUtilization timeOutQueries(BigDecimal timeOutQueries) {
    this.timeOutQueries = timeOutQueries;
    return this;
  }

   /**
   * Number of queries that timed out while waiting for resources in a pool.
   * @return timeOutQueries
  **/
  @ApiModelProperty(value = "Number of queries that timed out while waiting for resources in a pool.")
  public BigDecimal getTimeOutQueries() {
    return timeOutQueries;
  }

  public void setTimeOutQueries(BigDecimal timeOutQueries) {
    this.timeOutQueries = timeOutQueries;
  }

  public ApiImpalaTenantUtilization rejectedQueries(BigDecimal rejectedQueries) {
    this.rejectedQueries = rejectedQueries;
    return this;
  }

   /**
   * Number of queries that were rejected by Impala because the pool was full.
   * @return rejectedQueries
  **/
  @ApiModelProperty(value = "Number of queries that were rejected by Impala because the pool was full.")
  public BigDecimal getRejectedQueries() {
    return rejectedQueries;
  }

  public void setRejectedQueries(BigDecimal rejectedQueries) {
    this.rejectedQueries = rejectedQueries;
  }

  public ApiImpalaTenantUtilization avgWaitTimeInQueue(BigDecimal avgWaitTimeInQueue) {
    this.avgWaitTimeInQueue = avgWaitTimeInQueue;
    return this;
  }

   /**
   * Average time, in milliseconds, spent by a query in an Impala pool while waiting for resources.
   * @return avgWaitTimeInQueue
  **/
  @ApiModelProperty(value = "Average time, in milliseconds, spent by a query in an Impala pool while waiting for resources.")
  public BigDecimal getAvgWaitTimeInQueue() {
    return avgWaitTimeInQueue;
  }

  public void setAvgWaitTimeInQueue(BigDecimal avgWaitTimeInQueue) {
    this.avgWaitTimeInQueue = avgWaitTimeInQueue;
  }

  public ApiImpalaTenantUtilization peakAllocationTimestampMS(java.math.BigDecimal peakAllocationTimestampMS) {
    this.peakAllocationTimestampMS = peakAllocationTimestampMS;
    return this;
  }

   /**
   * The time when Impala reserved the maximum amount of memory for queries.
   * @return peakAllocationTimestampMS
  **/
  @ApiModelProperty(value = "The time when Impala reserved the maximum amount of memory for queries.")
  public java.math.BigDecimal getPeakAllocationTimestampMS() {
    return peakAllocationTimestampMS;
  }

  public void setPeakAllocationTimestampMS(java.math.BigDecimal peakAllocationTimestampMS) {
    this.peakAllocationTimestampMS = peakAllocationTimestampMS;
  }

  public ApiImpalaTenantUtilization maxAllocatedMemory(BigDecimal maxAllocatedMemory) {
    this.maxAllocatedMemory = maxAllocatedMemory;
    return this;
  }

   /**
   * The maximum memory (in bytes) that was reserved by Impala for executing queries.
   * @return maxAllocatedMemory
  **/
  @ApiModelProperty(value = "The maximum memory (in bytes) that was reserved by Impala for executing queries.")
  public BigDecimal getMaxAllocatedMemory() {
    return maxAllocatedMemory;
  }

  public void setMaxAllocatedMemory(BigDecimal maxAllocatedMemory) {
    this.maxAllocatedMemory = maxAllocatedMemory;
  }

  public ApiImpalaTenantUtilization maxAllocatedMemoryPercentage(BigDecimal maxAllocatedMemoryPercentage) {
    this.maxAllocatedMemoryPercentage = maxAllocatedMemoryPercentage;
    return this;
  }

   /**
   * The maximum percentage of memory that was reserved by Impala for executing queries.
   * @return maxAllocatedMemoryPercentage
  **/
  @ApiModelProperty(value = "The maximum percentage of memory that was reserved by Impala for executing queries.")
  public BigDecimal getMaxAllocatedMemoryPercentage() {
    return maxAllocatedMemoryPercentage;
  }

  public void setMaxAllocatedMemoryPercentage(BigDecimal maxAllocatedMemoryPercentage) {
    this.maxAllocatedMemoryPercentage = maxAllocatedMemoryPercentage;
  }

  public ApiImpalaTenantUtilization utilizedAtMaxAllocated(BigDecimal utilizedAtMaxAllocated) {
    this.utilizedAtMaxAllocated = utilizedAtMaxAllocated;
    return this;
  }

   /**
   * The amount of memory (in bytes) used by Impala for running queries at the time when maximum memory was reserved.
   * @return utilizedAtMaxAllocated
  **/
  @ApiModelProperty(value = "The amount of memory (in bytes) used by Impala for running queries at the time when maximum memory was reserved.")
  public BigDecimal getUtilizedAtMaxAllocated() {
    return utilizedAtMaxAllocated;
  }

  public void setUtilizedAtMaxAllocated(BigDecimal utilizedAtMaxAllocated) {
    this.utilizedAtMaxAllocated = utilizedAtMaxAllocated;
  }

  public ApiImpalaTenantUtilization utilizedAtMaxAllocatedPercentage(BigDecimal utilizedAtMaxAllocatedPercentage) {
    this.utilizedAtMaxAllocatedPercentage = utilizedAtMaxAllocatedPercentage;
    return this;
  }

   /**
   * The percentage of memory used by Impala for running queries at the time when maximum memory was reserved.
   * @return utilizedAtMaxAllocatedPercentage
  **/
  @ApiModelProperty(value = "The percentage of memory used by Impala for running queries at the time when maximum memory was reserved.")
  public BigDecimal getUtilizedAtMaxAllocatedPercentage() {
    return utilizedAtMaxAllocatedPercentage;
  }

  public void setUtilizedAtMaxAllocatedPercentage(BigDecimal utilizedAtMaxAllocatedPercentage) {
    this.utilizedAtMaxAllocatedPercentage = utilizedAtMaxAllocatedPercentage;
  }

  public ApiImpalaTenantUtilization peakUsageTimestampMS(java.math.BigDecimal peakUsageTimestampMS) {
    this.peakUsageTimestampMS = peakUsageTimestampMS;
    return this;
  }

   /**
   * The time when Impala used the maximum amount of memory for queries.
   * @return peakUsageTimestampMS
  **/
  @ApiModelProperty(value = "The time when Impala used the maximum amount of memory for queries.")
  public java.math.BigDecimal getPeakUsageTimestampMS() {
    return peakUsageTimestampMS;
  }

  public void setPeakUsageTimestampMS(java.math.BigDecimal peakUsageTimestampMS) {
    this.peakUsageTimestampMS = peakUsageTimestampMS;
  }

  public ApiImpalaTenantUtilization maxUtilizedMemory(BigDecimal maxUtilizedMemory) {
    this.maxUtilizedMemory = maxUtilizedMemory;
    return this;
  }

   /**
   * The maximum memory (in bytes) that was used by Impala for executing queries.
   * @return maxUtilizedMemory
  **/
  @ApiModelProperty(value = "The maximum memory (in bytes) that was used by Impala for executing queries.")
  public BigDecimal getMaxUtilizedMemory() {
    return maxUtilizedMemory;
  }

  public void setMaxUtilizedMemory(BigDecimal maxUtilizedMemory) {
    this.maxUtilizedMemory = maxUtilizedMemory;
  }

  public ApiImpalaTenantUtilization maxUtilizedMemoryPercentage(BigDecimal maxUtilizedMemoryPercentage) {
    this.maxUtilizedMemoryPercentage = maxUtilizedMemoryPercentage;
    return this;
  }

   /**
   * The maximum percentage of memory that was used by Impala for executing queries.
   * @return maxUtilizedMemoryPercentage
  **/
  @ApiModelProperty(value = "The maximum percentage of memory that was used by Impala for executing queries.")
  public BigDecimal getMaxUtilizedMemoryPercentage() {
    return maxUtilizedMemoryPercentage;
  }

  public void setMaxUtilizedMemoryPercentage(BigDecimal maxUtilizedMemoryPercentage) {
    this.maxUtilizedMemoryPercentage = maxUtilizedMemoryPercentage;
  }

  public ApiImpalaTenantUtilization allocatedAtMaxUtilized(BigDecimal allocatedAtMaxUtilized) {
    this.allocatedAtMaxUtilized = allocatedAtMaxUtilized;
    return this;
  }

   /**
   * The amount of memory (in bytes) reserved by Impala at the time when it was using the maximum memory for executing queries.
   * @return allocatedAtMaxUtilized
  **/
  @ApiModelProperty(value = "The amount of memory (in bytes) reserved by Impala at the time when it was using the maximum memory for executing queries.")
  public BigDecimal getAllocatedAtMaxUtilized() {
    return allocatedAtMaxUtilized;
  }

  public void setAllocatedAtMaxUtilized(BigDecimal allocatedAtMaxUtilized) {
    this.allocatedAtMaxUtilized = allocatedAtMaxUtilized;
  }

  public ApiImpalaTenantUtilization allocatedAtMaxUtilizedPercentage(BigDecimal allocatedAtMaxUtilizedPercentage) {
    this.allocatedAtMaxUtilizedPercentage = allocatedAtMaxUtilizedPercentage;
    return this;
  }

   /**
   * The percentage of memory reserved by Impala at the time when it was using the maximum memory for executing queries.
   * @return allocatedAtMaxUtilizedPercentage
  **/
  @ApiModelProperty(value = "The percentage of memory reserved by Impala at the time when it was using the maximum memory for executing queries.")
  public BigDecimal getAllocatedAtMaxUtilizedPercentage() {
    return allocatedAtMaxUtilizedPercentage;
  }

  public void setAllocatedAtMaxUtilizedPercentage(BigDecimal allocatedAtMaxUtilizedPercentage) {
    this.allocatedAtMaxUtilizedPercentage = allocatedAtMaxUtilizedPercentage;
  }

  public ApiImpalaTenantUtilization distributionUtilizedByImpalaDaemon(ApiImpalaUtilizationHistogram distributionUtilizedByImpalaDaemon) {
    this.distributionUtilizedByImpalaDaemon = distributionUtilizedByImpalaDaemon;
    return this;
  }

   /**
   * Distribution of memory used per Impala daemon for executing queries at the time Impala used the maximum memory.
   * @return distributionUtilizedByImpalaDaemon
  **/
  @ApiModelProperty(value = "Distribution of memory used per Impala daemon for executing queries at the time Impala used the maximum memory.")
  public ApiImpalaUtilizationHistogram getDistributionUtilizedByImpalaDaemon() {
    return distributionUtilizedByImpalaDaemon;
  }

  public void setDistributionUtilizedByImpalaDaemon(ApiImpalaUtilizationHistogram distributionUtilizedByImpalaDaemon) {
    this.distributionUtilizedByImpalaDaemon = distributionUtilizedByImpalaDaemon;
  }

  public ApiImpalaTenantUtilization distributionAllocatedByImpalaDaemon(ApiImpalaUtilizationHistogram distributionAllocatedByImpalaDaemon) {
    this.distributionAllocatedByImpalaDaemon = distributionAllocatedByImpalaDaemon;
    return this;
  }

   /**
   * Distribution of memory reserved per Impala daemon for executing queries at the time Impala used the maximum memory.
   * @return distributionAllocatedByImpalaDaemon
  **/
  @ApiModelProperty(value = "Distribution of memory reserved per Impala daemon for executing queries at the time Impala used the maximum memory.")
  public ApiImpalaUtilizationHistogram getDistributionAllocatedByImpalaDaemon() {
    return distributionAllocatedByImpalaDaemon;
  }

  public void setDistributionAllocatedByImpalaDaemon(ApiImpalaUtilizationHistogram distributionAllocatedByImpalaDaemon) {
    this.distributionAllocatedByImpalaDaemon = distributionAllocatedByImpalaDaemon;
  }

  public ApiImpalaTenantUtilization avgSpilledMemory(BigDecimal avgSpilledMemory) {
    this.avgSpilledMemory = avgSpilledMemory;
    return this;
  }

   /**
   * Average spill per query.
   * @return avgSpilledMemory
  **/
  @ApiModelProperty(value = "Average spill per query.")
  public BigDecimal getAvgSpilledMemory() {
    return avgSpilledMemory;
  }

  public void setAvgSpilledMemory(BigDecimal avgSpilledMemory) {
    this.avgSpilledMemory = avgSpilledMemory;
  }

  public ApiImpalaTenantUtilization maxSpilledMemory(BigDecimal maxSpilledMemory) {
    this.maxSpilledMemory = maxSpilledMemory;
    return this;
  }

   /**
   * Maximum spill per query.
   * @return maxSpilledMemory
  **/
  @ApiModelProperty(value = "Maximum spill per query.")
  public BigDecimal getMaxSpilledMemory() {
    return maxSpilledMemory;
  }

  public void setMaxSpilledMemory(BigDecimal maxSpilledMemory) {
    this.maxSpilledMemory = maxSpilledMemory;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiImpalaTenantUtilization apiImpalaTenantUtilization = (ApiImpalaTenantUtilization) o;
    return Objects.equals(this.tenantName, apiImpalaTenantUtilization.tenantName) &&
        Objects.equals(this.totalQueries, apiImpalaTenantUtilization.totalQueries) &&
        Objects.equals(this.successfulQueries, apiImpalaTenantUtilization.successfulQueries) &&
        Objects.equals(this.oomQueries, apiImpalaTenantUtilization.oomQueries) &&
        Objects.equals(this.timeOutQueries, apiImpalaTenantUtilization.timeOutQueries) &&
        Objects.equals(this.rejectedQueries, apiImpalaTenantUtilization.rejectedQueries) &&
        Objects.equals(this.avgWaitTimeInQueue, apiImpalaTenantUtilization.avgWaitTimeInQueue) &&
        Objects.equals(this.peakAllocationTimestampMS, apiImpalaTenantUtilization.peakAllocationTimestampMS) &&
        Objects.equals(this.maxAllocatedMemory, apiImpalaTenantUtilization.maxAllocatedMemory) &&
        Objects.equals(this.maxAllocatedMemoryPercentage, apiImpalaTenantUtilization.maxAllocatedMemoryPercentage) &&
        Objects.equals(this.utilizedAtMaxAllocated, apiImpalaTenantUtilization.utilizedAtMaxAllocated) &&
        Objects.equals(this.utilizedAtMaxAllocatedPercentage, apiImpalaTenantUtilization.utilizedAtMaxAllocatedPercentage) &&
        Objects.equals(this.peakUsageTimestampMS, apiImpalaTenantUtilization.peakUsageTimestampMS) &&
        Objects.equals(this.maxUtilizedMemory, apiImpalaTenantUtilization.maxUtilizedMemory) &&
        Objects.equals(this.maxUtilizedMemoryPercentage, apiImpalaTenantUtilization.maxUtilizedMemoryPercentage) &&
        Objects.equals(this.allocatedAtMaxUtilized, apiImpalaTenantUtilization.allocatedAtMaxUtilized) &&
        Objects.equals(this.allocatedAtMaxUtilizedPercentage, apiImpalaTenantUtilization.allocatedAtMaxUtilizedPercentage) &&
        Objects.equals(this.distributionUtilizedByImpalaDaemon, apiImpalaTenantUtilization.distributionUtilizedByImpalaDaemon) &&
        Objects.equals(this.distributionAllocatedByImpalaDaemon, apiImpalaTenantUtilization.distributionAllocatedByImpalaDaemon) &&
        Objects.equals(this.avgSpilledMemory, apiImpalaTenantUtilization.avgSpilledMemory) &&
        Objects.equals(this.maxSpilledMemory, apiImpalaTenantUtilization.maxSpilledMemory);
  }

  @Override
  public int hashCode() {
    return Objects.hash(tenantName, totalQueries, successfulQueries, oomQueries, timeOutQueries, rejectedQueries, avgWaitTimeInQueue, peakAllocationTimestampMS, maxAllocatedMemory, maxAllocatedMemoryPercentage, utilizedAtMaxAllocated, utilizedAtMaxAllocatedPercentage, peakUsageTimestampMS, maxUtilizedMemory, maxUtilizedMemoryPercentage, allocatedAtMaxUtilized, allocatedAtMaxUtilizedPercentage, distributionUtilizedByImpalaDaemon, distributionAllocatedByImpalaDaemon, avgSpilledMemory, maxSpilledMemory);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiImpalaTenantUtilization {\n");
    
    sb.append("    tenantName: ").append(toIndentedString(tenantName)).append("\n");
    sb.append("    totalQueries: ").append(toIndentedString(totalQueries)).append("\n");
    sb.append("    successfulQueries: ").append(toIndentedString(successfulQueries)).append("\n");
    sb.append("    oomQueries: ").append(toIndentedString(oomQueries)).append("\n");
    sb.append("    timeOutQueries: ").append(toIndentedString(timeOutQueries)).append("\n");
    sb.append("    rejectedQueries: ").append(toIndentedString(rejectedQueries)).append("\n");
    sb.append("    avgWaitTimeInQueue: ").append(toIndentedString(avgWaitTimeInQueue)).append("\n");
    sb.append("    peakAllocationTimestampMS: ").append(toIndentedString(peakAllocationTimestampMS)).append("\n");
    sb.append("    maxAllocatedMemory: ").append(toIndentedString(maxAllocatedMemory)).append("\n");
    sb.append("    maxAllocatedMemoryPercentage: ").append(toIndentedString(maxAllocatedMemoryPercentage)).append("\n");
    sb.append("    utilizedAtMaxAllocated: ").append(toIndentedString(utilizedAtMaxAllocated)).append("\n");
    sb.append("    utilizedAtMaxAllocatedPercentage: ").append(toIndentedString(utilizedAtMaxAllocatedPercentage)).append("\n");
    sb.append("    peakUsageTimestampMS: ").append(toIndentedString(peakUsageTimestampMS)).append("\n");
    sb.append("    maxUtilizedMemory: ").append(toIndentedString(maxUtilizedMemory)).append("\n");
    sb.append("    maxUtilizedMemoryPercentage: ").append(toIndentedString(maxUtilizedMemoryPercentage)).append("\n");
    sb.append("    allocatedAtMaxUtilized: ").append(toIndentedString(allocatedAtMaxUtilized)).append("\n");
    sb.append("    allocatedAtMaxUtilizedPercentage: ").append(toIndentedString(allocatedAtMaxUtilizedPercentage)).append("\n");
    sb.append("    distributionUtilizedByImpalaDaemon: ").append(toIndentedString(distributionUtilizedByImpalaDaemon)).append("\n");
    sb.append("    distributionAllocatedByImpalaDaemon: ").append(toIndentedString(distributionAllocatedByImpalaDaemon)).append("\n");
    sb.append("    avgSpilledMemory: ").append(toIndentedString(avgSpilledMemory)).append("\n");
    sb.append("    maxSpilledMemory: ").append(toIndentedString(maxSpilledMemory)).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    ");
  }
  
}

