Class V1CapacityRequirements

java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1CapacityRequirements

@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class V1CapacityRequirements extends Object
CapacityRequirements defines the capacity requirements for a specific device request.
  • Field Details

  • Constructor Details

    • V1CapacityRequirements

      public V1CapacityRequirements()
  • Method Details

    • getRequests

      public Map<String, @NotNull String> getRequests()
      Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[]..compareTo(quantity()) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field.
      Returns:
      the requests property value
    • setRequests

      public void setRequests(Map<String, @NotNull String> requests)
      Set the requests property value
      Parameters:
      requests - property value to set
    • requests

      public V1CapacityRequirements requests(Map<String, @NotNull String> requests)
      Set requests in a chainable fashion.
      Returns:
      The same instance of V1CapacityRequirements for chaining.
    • putRequestsItem

      public V1CapacityRequirements putRequestsItem(String key, String requestsItem)
      Set the value for the key for the requests map property in a chainable fashion.
      Returns:
      The same instance of V1CapacityRequirements for chaining.
    • 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