Class V1beta2Device
java.lang.Object
io.kubernetes.client.openapi.models.V1beta2Device
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-05-20T20:47:13.890592Z[Etc/UTC]",
comments="Generator version: 7.13.0")
public class V1beta2Device
extends Object
Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConsumesCountersItem
(V1beta2DeviceCounterConsumption consumesCountersItem) addTaintsItem
(V1beta2DeviceTaint taintsItem) attributes
(Map<String, V1beta2DeviceAttribute> attributes) capacity
(Map<String, V1beta2DeviceCapacity> capacity) consumesCounters
(List<V1beta2DeviceCounterConsumption> consumesCounters) boolean
static V1beta2Device
Create an instance of V1beta2Device given an JSON stringAllNodes indicates that all nodes have access to the device.Attributes defines the set of attributes for this device.Capacity defines the set of capacities for this device.ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.getName()
Name is unique identifier among all devices managed by the driver in the pool.NodeName identifies the node where the device is available.Get nodeSelectorIf specified, these are the driver-defined taints.int
hashCode()
nodeSelector
(V1NodeSelector nodeSelector) putAttributesItem
(String key, V1beta2DeviceAttribute attributesItem) putCapacityItem
(String key, V1beta2DeviceCapacity capacityItem) void
setAllNodes
(Boolean allNodes) void
setAttributes
(Map<String, V1beta2DeviceAttribute> attributes) void
setCapacity
(Map<String, V1beta2DeviceCapacity> capacity) void
setConsumesCounters
(List<V1beta2DeviceCounterConsumption> consumesCounters) void
void
setNodeName
(String nodeName) void
setNodeSelector
(V1NodeSelector nodeSelector) void
setTaints
(List<V1beta2DeviceTaint> taints) taints
(List<V1beta2DeviceTaint> taints) toJson()
Convert an instance of V1beta2Device to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ALL_NODES
- See Also:
-
SERIALIZED_NAME_ATTRIBUTES
- See Also:
-
SERIALIZED_NAME_CAPACITY
- See Also:
-
SERIALIZED_NAME_CONSUMES_COUNTERS
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_NODE_NAME
- See Also:
-
SERIALIZED_NAME_NODE_SELECTOR
- See Also:
-
SERIALIZED_NAME_TAINTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1beta2Device
public V1beta2Device()
-
-
Method Details
-
allNodes
-
getAllNodes
AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.- Returns:
- allNodes
-
setAllNodes
-
attributes
-
putAttributesItem
-
getAttributes
Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32.- Returns:
- attributes
-
setAttributes
-
capacity
-
putCapacityItem
-
getCapacity
Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32.- Returns:
- capacity
-
setCapacity
-
consumesCounters
public V1beta2Device consumesCounters(@Nullable List<V1beta2DeviceCounterConsumption> consumesCounters) -
addConsumesCountersItem
-
getConsumesCounters
ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).- Returns:
- consumesCounters
-
setConsumesCounters
-
name
-
getName
Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.- Returns:
- name
-
setName
-
nodeName
-
getNodeName
NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.- Returns:
- nodeName
-
setNodeName
-
nodeSelector
-
getNodeSelector
Get nodeSelector- Returns:
- nodeSelector
-
setNodeSelector
-
taints
-
addTaintsItem
-
getTaints
If specified, these are the driver-defined taints. The maximum number of taints is 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate.- Returns:
- taints
-
setTaints
-
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 V1beta2Device
-
fromJson
Create an instance of V1beta2Device given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1beta2Device
- Throws:
IOException
- if the JSON string is invalid with respect to V1beta2Device
-
toJson
Convert an instance of V1beta2Device to an JSON string- Returns:
- JSON string
-