Class V1ResourceRequirements

java.lang.Object
io.kubernetes.client.openapi.models.V1ResourceRequirements

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1ResourceRequirements extends Object
ResourceRequirements describes the compute resource requirements.
  • Field Details

  • Constructor Details

    • V1ResourceRequirements

      public V1ResourceRequirements()
  • Method Details

    • claims

      public V1ResourceRequirements claims(List<V1ResourceClaim> claims)
    • addClaimsItem

      public V1ResourceRequirements addClaimsItem(V1ResourceClaim claimsItem)
    • getClaims

      @Nullable public List<V1ResourceClaim> getClaims()
      Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
      Returns:
      claims
    • setClaims

      public void setClaims(List<V1ResourceClaim> claims)
    • limits

      public V1ResourceRequirements limits(Map<String,Quantity> limits)
    • putLimitsItem

      public V1ResourceRequirements putLimitsItem(String key, Quantity limitsItem)
    • getLimits

      @Nullable public Map<String,Quantity> getLimits()
      Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
      Returns:
      limits
    • setLimits

      public void setLimits(Map<String,Quantity> limits)
    • requests

      public V1ResourceRequirements requests(Map<String,Quantity> requests)
    • putRequestsItem

      public V1ResourceRequirements putRequestsItem(String key, Quantity requestsItem)
    • getRequests

      @Nullable public Map<String,Quantity> getRequests()
      Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
      Returns:
      requests
    • setRequests

      public void setRequests(Map<String,Quantity> requests)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1ResourceRequirements
    • fromJson

      public static V1ResourceRequirements fromJson(String jsonString) throws IOException
      Create an instance of V1ResourceRequirements given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1ResourceRequirements
      Throws:
      IOException - if the JSON string is invalid with respect to V1ResourceRequirements
    • toJson

      public String toJson()
      Convert an instance of V1ResourceRequirements to an JSON string
      Returns:
      JSON string