Class V1beta1CapacityRequirements
java.lang.Object
io.kubernetes.client.openapi.models.V1beta1CapacityRequirements
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-09-11T18:00:16.154662Z[Etc/UTC]",
comments="Generator version: 7.13.0")
public class V1beta1CapacityRequirements
extends Object
CapacityRequirements defines the capacity requirements for a specific device request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic V1beta1CapacityRequirementsCreate an instance of V1beta1CapacityRequirements given an JSON stringRequests represent individual device resource requests for distinct resources, all of which must be provided by the device.inthashCode()putRequestsItem(String key, Quantity requestsItem) voidsetRequests(Map<String, Quantity> requests) toJson()Convert an instance of V1beta1CapacityRequirements to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_REQUESTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1beta1CapacityRequirements
public V1beta1CapacityRequirements()
-
-
Method Details
-
requests
-
putRequestsItem
-
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[<domain>].<name>.compareTo(quantity(<request 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:
- requests
-
setRequests
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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 V1beta1CapacityRequirements
-
fromJson
Create an instance of V1beta1CapacityRequirements given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of V1beta1CapacityRequirements
- Throws:
IOException- if the JSON string is invalid with respect to V1beta1CapacityRequirements
-
toJson
Convert an instance of V1beta1CapacityRequirements to an JSON string- Returns:
- JSON string
-