kubernetes.client.models.v1beta2_device module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

class kubernetes.client.models.v1beta2_device.V1beta2Device(*, all_nodes: Annotated[bool, Strict(strict=True)] | None = None, allow_multiple_allocations: Annotated[bool, Strict(strict=True)] | None = None, attributes: Dict[str, V1beta2DeviceAttribute] | None = None, binding_conditions: List[Annotated[str, Strict(strict=True)]] | None = None, binding_failure_conditions: List[Annotated[str, Strict(strict=True)]] | None = None, binds_to_node: Annotated[bool, Strict(strict=True)] | None = None, capacity: Dict[str, V1beta2DeviceCapacity] | None = None, consumes_counters: List[V1beta2DeviceCounterConsumption] | None = None, name: Annotated[str, Strict(strict=True)], node_allocatable_resource_mappings: Dict[str, V1beta2NodeAllocatableResourceMapping] | None = None, node_name: Annotated[str, Strict(strict=True)] | None = None, node_selector: V1NodeSelector | None = None, taints: List[V1beta2DeviceTaint] | None = None)

Bases: BaseModel

Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.

Attributes:
openapi_types (dict): The key is attribute name

and the value is attribute type.

attribute_map (dict): The key is attribute name

and the value is json key in definition.

all_nodes: StrictBool | None
allow_multiple_allocations: StrictBool | None
attribute_map: ClassVar[Dict[str, str]] = {'all_nodes': 'allNodes', 'allow_multiple_allocations': 'allowMultipleAllocations', 'attributes': 'attributes', 'binding_conditions': 'bindingConditions', 'binding_failure_conditions': 'bindingFailureConditions', 'binds_to_node': 'bindsToNode', 'capacity': 'capacity', 'consumes_counters': 'consumesCounters', 'name': 'name', 'node_allocatable_resource_mappings': 'nodeAllocatableResourceMappings', 'node_name': 'nodeName', 'node_selector': 'nodeSelector', 'taints': 'taints'}
attributes: Dict[str, V1beta2DeviceAttribute] | None
binding_conditions: List[StrictStr] | None
binding_failure_conditions: List[StrictStr] | None
binds_to_node: StrictBool | None
capacity: Dict[str, V1beta2DeviceCapacity] | None
consumes_counters: List[V1beta2DeviceCounterConsumption] | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1beta2Device from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1beta2Device from a JSON string

model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: StrictStr
node_allocatable_resource_mappings: Dict[str, V1beta2NodeAllocatableResourceMapping] | None
node_name: StrictStr | None
node_selector: V1NodeSelector | None
openapi_types: ClassVar[Dict[str, str]] = {'all_nodes': 'bool', 'allow_multiple_allocations': 'bool', 'attributes': 'Dict[str, V1beta2DeviceAttribute]', 'binding_conditions': 'List[str]', 'binding_failure_conditions': 'List[str]', 'binds_to_node': 'bool', 'capacity': 'Dict[str, V1beta2DeviceCapacity]', 'consumes_counters': 'List[V1beta2DeviceCounterConsumption]', 'name': 'str', 'node_allocatable_resource_mappings': 'Dict[str, V1beta2NodeAllocatableResourceMapping]', 'node_name': 'str', 'node_selector': 'V1NodeSelector', 'taints': 'List[V1beta2DeviceTaint]'}
taints: List[V1beta2DeviceTaint] | None
to_dict(serialize: bool = False) Dict[str, Any]

Return all declared model fields using public or wire names.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model