All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kubernetes.client.models.V1ResourceQuotaSpec Maven / Gradle / Ivy

/*
 * Kubernetes
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v1.11.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 io.kubernetes.client.models;

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.kubernetes.client.custom.Quantity;
import io.kubernetes.client.models.V1ScopeSelector;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
 */
@ApiModel(description = "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.")

public class V1ResourceQuotaSpec {
  @SerializedName("hard")
  private Map hard = null;

  @SerializedName("scopeSelector")
  private V1ScopeSelector scopeSelector = null;

  @SerializedName("scopes")
  private List scopes = null;

  public V1ResourceQuotaSpec hard(Map hard) {
    this.hard = hard;
    return this;
  }

  public V1ResourceQuotaSpec putHardItem(String key, Quantity hardItem) {
    if (this.hard == null) {
      this.hard = new HashMap();
    }
    this.hard.put(key, hardItem);
    return this;
  }

   /**
   * hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
   * @return hard
  **/
  @ApiModelProperty(value = "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/")
  public Map getHard() {
    return hard;
  }

  public void setHard(Map hard) {
    this.hard = hard;
  }

  public V1ResourceQuotaSpec scopeSelector(V1ScopeSelector scopeSelector) {
    this.scopeSelector = scopeSelector;
    return this;
  }

   /**
   * scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
   * @return scopeSelector
  **/
  @ApiModelProperty(value = "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.")
  public V1ScopeSelector getScopeSelector() {
    return scopeSelector;
  }

  public void setScopeSelector(V1ScopeSelector scopeSelector) {
    this.scopeSelector = scopeSelector;
  }

  public V1ResourceQuotaSpec scopes(List scopes) {
    this.scopes = scopes;
    return this;
  }

  public V1ResourceQuotaSpec addScopesItem(String scopesItem) {
    if (this.scopes == null) {
      this.scopes = new ArrayList();
    }
    this.scopes.add(scopesItem);
    return this;
  }

   /**
   * A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.
   * @return scopes
  **/
  @ApiModelProperty(value = "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.")
  public List getScopes() {
    return scopes;
  }

  public void setScopes(List scopes) {
    this.scopes = scopes;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1ResourceQuotaSpec v1ResourceQuotaSpec = (V1ResourceQuotaSpec) o;
    return Objects.equals(this.hard, v1ResourceQuotaSpec.hard) &&
        Objects.equals(this.scopeSelector, v1ResourceQuotaSpec.scopeSelector) &&
        Objects.equals(this.scopes, v1ResourceQuotaSpec.scopes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(hard, scopeSelector, scopes);
  }


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

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy