/*
 * 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.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.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Information about the number of nodes using which product features. &lt;p&gt; Usage information is provided for individual clusters, as well as totals across all clusters.
 */
@ApiModel(description = "Information about the number of nodes using which product features. <p> Usage information is provided for individual clusters, as well as totals across all clusters.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiLicensedFeatureUsage {
  @SerializedName("totals")
  private Map<String, java.math.BigDecimal> totals = null;

  @SerializedName("clusters")
  private Map<String, Object> clusters = null;

  public ApiLicensedFeatureUsage totals(Map<String, java.math.BigDecimal> totals) {
    this.totals = totals;
    return this;
  }

  public ApiLicensedFeatureUsage putTotalsItem(String key, java.math.BigDecimal totalsItem) {
    if (this.totals == null) {
      this.totals = new HashMap<String, java.math.BigDecimal>();
    }
    this.totals.put(key, totalsItem);
    return this;
  }

   /**
   * Map from named features to the total number of nodes using those features.
   * @return totals
  **/
  @ApiModelProperty(value = "Map from named features to the total number of nodes using those features.")
  public Map<String, java.math.BigDecimal> getTotals() {
    return totals;
  }

  public void setTotals(Map<String, java.math.BigDecimal> totals) {
    this.totals = totals;
  }

  public ApiLicensedFeatureUsage clusters(Map<String, Object> clusters) {
    this.clusters = clusters;
    return this;
  }

  public ApiLicensedFeatureUsage putClustersItem(String key, Object clustersItem) {
    if (this.clusters == null) {
      this.clusters = new HashMap<String, Object>();
    }
    this.clusters.put(key, clustersItem);
    return this;
  }

   /**
   * Map from clusters to maps of named features to the number of nodes in the cluster using those features.
   * @return clusters
  **/
  @ApiModelProperty(value = "Map from clusters to maps of named features to the number of nodes in the cluster using those features.")
  public Map<String, Object> getClusters() {
    return clusters;
  }

  public void setClusters(Map<String, Object> clusters) {
    this.clusters = clusters;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiLicensedFeatureUsage apiLicensedFeatureUsage = (ApiLicensedFeatureUsage) o;
    return Objects.equals(this.totals, apiLicensedFeatureUsage.totals) &&
        Objects.equals(this.clusters, apiLicensedFeatureUsage.clusters);
  }

  @Override
  public int hashCode() {
    return Objects.hash(totals, clusters);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiLicensedFeatureUsage {\n");
    
    sb.append("    totals: ").append(toIndentedString(totals)).append("\n");
    sb.append("    clusters: ").append(toIndentedString(clusters)).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    ");
  }
  
}

