Class V1ResourceStatus

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-02-12T21:15:49.397498Z[Etc/UTC]", comments="Generator version: 7.6.0") public class V1ResourceStatus extends Object
ResourceStatus represents the status of a single resource allocated to a Pod.
  • Field Details

  • Constructor Details

    • V1ResourceStatus

      public V1ResourceStatus()
  • Method Details

    • name

      public V1ResourceStatus name(String name)
    • getName

      @Nonnull public String getName()
      Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:<claim_name>/<request>\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container.
      Returns:
      name
    • setName

      public void setName(String name)
    • resources

      public V1ResourceStatus resources(List<V1ResourceHealth> resources)
    • addResourcesItem

      public V1ResourceStatus addResourcesItem(V1ResourceHealth resourcesItem)
    • getResources

      @Nullable public List<V1ResourceHealth> getResources()
      List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases.
      Returns:
      resources
    • setResources

      public void setResources(List<V1ResourceHealth> resources)
    • 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
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to V1ResourceStatus
    • fromJson

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

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