# autogenerated module
from typing import List, Optional, TYPE_CHECKING

from ._schema import dataclass, field, DictMixin

if TYPE_CHECKING:   # Fix for pycharm autocompletion https://youtrack.jetbrains.com/issue/PY-54560
    from dataclasses import dataclass, field

from . import core_v1
from . import runtime
from . import meta_v1
from . import resource


@dataclass
class AllocationResult(DictMixin):
    """AllocationResult contains attributes of an allocated resource.

      **parameters**

      * **availableOnNodes** ``Optional[core_v1.NodeSelector]`` - This field will get set by the resource driver after it has allocated the
        resource to inform the scheduler where it can schedule Pods using the
        ResourceClaim.
        Setting this field is optional. If null, the resource is available everywhere.
      * **resourceHandles** ``Optional[List[ResourceHandle]]`` - ResourceHandles contain the state associated with an allocation that should be
        maintained throughout the lifetime of a claim. Each ResourceHandle contains
        data that should be passed to a specific kubelet plugin once it lands on a
        node. This data is returned by the driver after a successful allocation and is
        opaque to Kubernetes. Driver documentation may explain to users how to
        interpret this data if needed.
        Setting this field is optional. It has a maximum size of 32 entries. If null
        (or empty), it is assumed this allocation will be processed by a single
        kubelet plugin with no ResourceHandle data attached. The name of the kubelet
        plugin invoked will match the DriverName set in the ResourceClaimStatus this
        AllocationResult is embedded in.
      * **shareable** ``Optional[bool]`` - Shareable determines whether the resource supports more than one consumer at a
        time.
    """
    availableOnNodes: 'Optional[core_v1.NodeSelector]' = None
    resourceHandles: 'Optional[List[ResourceHandle]]' = None
    shareable: 'Optional[bool]' = None


@dataclass
class DriverAllocationResult(DictMixin):
    """DriverAllocationResult contains vendor parameters and the allocation result
      for one request.

      **parameters**

      * **namedResources** ``Optional[NamedResourcesAllocationResult]`` - NamedResources describes the allocation result when using the named resources
        model.
      * **vendorRequestParameters** ``Optional[runtime.RawExtension]`` - VendorRequestParameters are the per-request configuration parameters from the
        time that the claim was allocated.
    """
    namedResources: 'Optional[NamedResourcesAllocationResult]' = None
    vendorRequestParameters: 'Optional[runtime.RawExtension]' = None


@dataclass
class DriverRequests(DictMixin):
    """DriverRequests describes all resources that are needed from one particular
      driver.

      **parameters**

      * **driverName** ``Optional[str]`` - DriverName is the name used by the DRA driver kubelet plugin.
      * **requests** ``Optional[List[ResourceRequest]]`` - Requests describes all resources that are needed from the driver.
      * **vendorParameters** ``Optional[runtime.RawExtension]`` - VendorParameters are arbitrary setup parameters for all requests of the claim.
        They are ignored while allocating the claim.
    """
    driverName: 'Optional[str]' = None
    requests: 'Optional[List[ResourceRequest]]' = None
    vendorParameters: 'Optional[runtime.RawExtension]' = None


@dataclass
class NamedResourcesAllocationResult(DictMixin):
    """NamedResourcesAllocationResult is used in AllocationResultModel.

      **parameters**

      * **name** ``str`` - Name is the name of the selected resource instance.
    """
    name: 'str'


@dataclass
class NamedResourcesAttribute(DictMixin):
    """NamedResourcesAttribute is a combination of an attribute name and its value.

      **parameters**

      * **name** ``str`` - Name is unique identifier among all resource instances managed by the driver
        on the node. It must be a DNS subdomain.
      * **bool** ``Optional[bool]`` - BoolValue is a true/false value.
      * **int** ``Optional[int]`` - IntValue is a 64-bit integer.
      * **intSlice** ``Optional[NamedResourcesIntSlice]`` - IntSliceValue is an array of 64-bit integers.
      * **quantity** ``Optional[resource.Quantity]`` - QuantityValue is a quantity.
      * **string** ``Optional[str]`` - StringValue is a string.
      * **stringSlice** ``Optional[NamedResourcesStringSlice]`` - StringSliceValue is an array of strings.
      * **version** ``Optional[str]`` - VersionValue is a semantic version according to semver.org spec 2.0.0.
    """
    name: 'str'
    bool: 'Optional[bool]' = None
    int: 'Optional[int]' = None
    intSlice: 'Optional[NamedResourcesIntSlice]' = None
    quantity: 'Optional[resource.Quantity]' = None
    string: 'Optional[str]' = None
    stringSlice: 'Optional[NamedResourcesStringSlice]' = None
    version: 'Optional[str]' = None


@dataclass
class NamedResourcesFilter(DictMixin):
    """NamedResourcesFilter is used in ResourceFilterModel.

      **parameters**

      * **selector** ``str`` - Selector is a CEL expression which must evaluate to true if a resource
        instance is suitable. The language is as defined in
        https://kubernetes.io/docs/reference/using-api/cel/
        In addition, for each type NamedResourcesin AttributeValue there is a map that
        resolves to the corresponding value of the instance under evaluation. For
        example:
           attributes.quantity["a"].isGreaterThan(quantity("0")) &&
           attributes.stringslice["b"].isSorted()
    """
    selector: 'str'


@dataclass
class NamedResourcesInstance(DictMixin):
    """NamedResourcesInstance represents one individual hardware instance that can be
      selected based on its attributes.

      **parameters**

      * **name** ``str`` - Name is unique identifier among all resource instances managed by the driver
        on the node. It must be a DNS subdomain.
      * **attributes** ``Optional[List[NamedResourcesAttribute]]`` - Attributes defines the attributes of this resource instance. The name of each
        attribute must be unique.
    """
    name: 'str'
    attributes: 'Optional[List[NamedResourcesAttribute]]' = None


@dataclass
class NamedResourcesIntSlice(DictMixin):
    """NamedResourcesIntSlice contains a slice of 64-bit integers.

      **parameters**

      * **ints** ``List[int]`` - Ints is the slice of 64-bit integers.
    """
    ints: 'List[int]'


@dataclass
class NamedResourcesRequest(DictMixin):
    """NamedResourcesRequest is used in ResourceRequestModel.

      **parameters**

      * **selector** ``str`` - Selector is a CEL expression which must evaluate to true if a resource
        instance is suitable. The language is as defined in
        https://kubernetes.io/docs/reference/using-api/cel/
        In addition, for each type NamedResourcesin AttributeValue there is a map that
        resolves to the corresponding value of the instance under evaluation. For
        example:
           attributes.quantity["a"].isGreaterThan(quantity("0")) &&
           attributes.stringslice["b"].isSorted()
    """
    selector: 'str'


@dataclass
class NamedResourcesResources(DictMixin):
    """NamedResourcesResources is used in ResourceModel.

      **parameters**

      * **instances** ``List[NamedResourcesInstance]`` - The list of all individual resources instances currently available.
    """
    instances: 'List[NamedResourcesInstance]'


@dataclass
class NamedResourcesStringSlice(DictMixin):
    """NamedResourcesStringSlice contains a slice of strings.

      **parameters**

      * **strings** ``List[str]`` - Strings is the slice of strings.
    """
    strings: 'List[str]'


@dataclass
class PodSchedulingContext(DictMixin):
    """PodSchedulingContext objects hold information that is needed to schedule a Pod
      with ResourceClaims that use "WaitForFirstConsumer" allocation mode.
      
      This is an alpha type and requires enabling the DynamicResourceAllocation
      feature gate.

      **parameters**

      * **spec** ``PodSchedulingContextSpec`` - Spec describes where resources for the Pod are needed.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
      * **status** ``Optional[PodSchedulingContextStatus]`` - Status describes where resources for the Pod can be allocated.
    """
    spec: 'PodSchedulingContextSpec'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    status: 'Optional[PodSchedulingContextStatus]' = None


@dataclass
class PodSchedulingContextList(DictMixin):
    """PodSchedulingContextList is a collection of Pod scheduling objects.

      **parameters**

      * **items** ``List[PodSchedulingContext]`` - Items is the list of PodSchedulingContext objects.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[PodSchedulingContext]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class PodSchedulingContextSpec(DictMixin):
    """PodSchedulingContextSpec describes where resources for the Pod are needed.

      **parameters**

      * **potentialNodes** ``Optional[List[str]]`` - PotentialNodes lists nodes where the Pod might be able to run.
        The size of this field is limited to 128. This is large enough for many
        clusters. Larger clusters may need more attempts to find a node that suits all
        pending resources. This may get increased in the future, but not reduced.
      * **selectedNode** ``Optional[str]`` - SelectedNode is the node for which allocation of ResourceClaims that are
        referenced by the Pod and that use "WaitForFirstConsumer" allocation is to be
        attempted.
    """
    potentialNodes: 'Optional[List[str]]' = None
    selectedNode: 'Optional[str]' = None


@dataclass
class PodSchedulingContextStatus(DictMixin):
    """PodSchedulingContextStatus describes where resources for the Pod can be
      allocated.

      **parameters**

      * **resourceClaims** ``Optional[List[ResourceClaimSchedulingStatus]]`` - ResourceClaims describes resource availability for each pod.spec.resourceClaim
        entry where the corresponding ResourceClaim uses "WaitForFirstConsumer"
        allocation mode.
    """
    resourceClaims: 'Optional[List[ResourceClaimSchedulingStatus]]' = None


@dataclass
class ResourceClaim(DictMixin):
    """ResourceClaim describes which resources are needed by a resource consumer. Its
      status tracks whether the resource has been allocated and what the resulting
      attributes are.
      
      This is an alpha type and requires enabling the DynamicResourceAllocation
      feature gate.

      **parameters**

      * **spec** ``ResourceClaimSpec`` - Spec describes the desired attributes of a resource that then needs to be
        allocated. It can only be set once when creating the ResourceClaim.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
      * **status** ``Optional[ResourceClaimStatus]`` - Status describes whether the resource is available and with which attributes.
    """
    spec: 'ResourceClaimSpec'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    status: 'Optional[ResourceClaimStatus]' = None


@dataclass
class ResourceClaimConsumerReference(DictMixin):
    """ResourceClaimConsumerReference contains enough information to let you locate
      the consumer of a ResourceClaim. The user must be a resource in the same
      namespace as the ResourceClaim.

      **parameters**

      * **name** ``str`` - Name is the name of resource being referenced.
      * **resource** ``str`` - Resource is the type of resource being referenced, for example "pods".
      * **uid** ``str`` - UID identifies exactly one incarnation of the resource.
      * **apiGroup** ``Optional[str]`` - APIGroup is the group for the resource being referenced. It is empty for the
        core API. This matches the group in the APIVersion that is used when creating
        the resources.
    """
    name: 'str'
    resource: 'str'
    uid: 'str'
    apiGroup: 'Optional[str]' = None


@dataclass
class ResourceClaimList(DictMixin):
    """ResourceClaimList is a collection of claims.

      **parameters**

      * **items** ``List[ResourceClaim]`` - Items is the list of resource claims.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[ResourceClaim]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class ResourceClaimParameters(DictMixin):
    """ResourceClaimParameters defines resource requests for a ResourceClaim in an
      in-tree format understood by Kubernetes.

      **parameters**

      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **driverRequests** ``Optional[List[DriverRequests]]`` - DriverRequests describes all resources that are needed for the allocated
        claim. A single claim may use resources coming from different drivers. For
        each driver, this array has at most one entry which then may have one or more
        per-driver requests.
        May be empty, in which case the claim can always be allocated.
      * **generatedFrom** ``Optional[ResourceClaimParametersReference]`` - If this object was created from some other resource, then this links back to
        that resource. This field is used to find the in-tree representation of the
        claim parameters when the parameter reference of the claim refers to some
        unknown type.
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
      * **shareable** ``Optional[bool]`` - Shareable indicates whether the allocated claim is meant to be shareable by
        multiple consumers at the same time.
    """
    apiVersion: 'Optional[str]' = None
    driverRequests: 'Optional[List[DriverRequests]]' = None
    generatedFrom: 'Optional[ResourceClaimParametersReference]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    shareable: 'Optional[bool]' = None


@dataclass
class ResourceClaimParametersList(DictMixin):
    """ResourceClaimParametersList is a collection of ResourceClaimParameters.

      **parameters**

      * **items** ``List[ResourceClaimParameters]`` - Items is the list of node resource capacity objects.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[ResourceClaimParameters]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class ResourceClaimParametersReference(DictMixin):
    """ResourceClaimParametersReference contains enough information to let you locate
      the parameters for a ResourceClaim. The object must be in the same namespace
      as the ResourceClaim.

      **parameters**

      * **kind** ``str`` - Kind is the type of resource being referenced. This is the same value as in
        the parameter object's metadata, for example "ConfigMap".
      * **name** ``str`` - Name is the name of resource being referenced.
      * **apiGroup** ``Optional[str]`` - APIGroup is the group for the resource being referenced. It is empty for the
        core API. This matches the group in the APIVersion that is used when creating
        the resources.
    """
    kind: 'str'
    name: 'str'
    apiGroup: 'Optional[str]' = None


@dataclass
class ResourceClaimSchedulingStatus(DictMixin):
    """ResourceClaimSchedulingStatus contains information about one particular
      ResourceClaim with "WaitForFirstConsumer" allocation mode.

      **parameters**

      * **name** ``Optional[str]`` - Name matches the pod.spec.resourceClaims[*].Name field.
      * **unsuitableNodes** ``Optional[List[str]]`` - UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.
        The size of this field is limited to 128, the same as for
        PodSchedulingSpec.PotentialNodes. This may get increased in the future, but
        not reduced.
    """
    name: 'Optional[str]' = None
    unsuitableNodes: 'Optional[List[str]]' = None


@dataclass
class ResourceClaimSpec(DictMixin):
    """ResourceClaimSpec defines how a resource is to be allocated.

      **parameters**

      * **resourceClassName** ``str`` - ResourceClassName references the driver and additional parameters via the name
        of a ResourceClass that was created as part of the driver deployment.
      * **allocationMode** ``Optional[str]`` - Allocation can start immediately or when a Pod wants to use the resource.
        "WaitForFirstConsumer" is the default.
      * **parametersRef** ``Optional[ResourceClaimParametersReference]`` - ParametersRef references a separate object with arbitrary parameters that will
        be used by the driver when allocating a resource for the claim.
        The object must be in the same namespace as the ResourceClaim.
    """
    resourceClassName: 'str'
    allocationMode: 'Optional[str]' = None
    parametersRef: 'Optional[ResourceClaimParametersReference]' = None


@dataclass
class ResourceClaimStatus(DictMixin):
    """ResourceClaimStatus tracks whether the resource has been allocated and what
      the resulting attributes are.

      **parameters**

      * **allocation** ``Optional[AllocationResult]`` - Allocation is set by the resource driver once a resource or set of resources
        has been allocated successfully. If this is not specified, the resources have
        not been allocated yet.
      * **deallocationRequested** ``Optional[bool]`` - DeallocationRequested indicates that a ResourceClaim is to be deallocated.
        The driver then must deallocate this claim and reset the field together with
        clearing the Allocation field.
        While DeallocationRequested is set, no new consumers may be added to
        ReservedFor.
      * **driverName** ``Optional[str]`` - DriverName is a copy of the driver name from the ResourceClass at the time
        when allocation started.
      * **reservedFor** ``Optional[List[ResourceClaimConsumerReference]]`` - ReservedFor indicates which entities are currently allowed to use the claim. A
        Pod which references a ResourceClaim which is not reserved for that Pod will
        not be started.
        There can be at most 32 such reservations. This may get increased in the
        future, but not reduced.
    """
    allocation: 'Optional[AllocationResult]' = None
    deallocationRequested: 'Optional[bool]' = None
    driverName: 'Optional[str]' = None
    reservedFor: 'Optional[List[ResourceClaimConsumerReference]]' = None


@dataclass
class ResourceClaimTemplate(DictMixin):
    """ResourceClaimTemplate is used to produce ResourceClaim objects.

      **parameters**

      * **spec** ``ResourceClaimTemplateSpec`` - Describes the ResourceClaim that is to be generated.
        This field is immutable. A ResourceClaim will get created by the control plane
        for a Pod when needed and then not get updated anymore.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
    """
    spec: 'ResourceClaimTemplateSpec'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None


@dataclass
class ResourceClaimTemplateList(DictMixin):
    """ResourceClaimTemplateList is a collection of claim templates.

      **parameters**

      * **items** ``List[ResourceClaimTemplate]`` - Items is the list of resource claim templates.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[ResourceClaimTemplate]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class ResourceClaimTemplateSpec(DictMixin):
    """ResourceClaimTemplateSpec contains the metadata and fields for a
      ResourceClaim.

      **parameters**

      * **spec** ``ResourceClaimSpec`` - Spec for the ResourceClaim. The entire content is copied unchanged into the
        ResourceClaim that gets created from this template. The same fields as in a
        ResourceClaim are also valid here.
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - ObjectMeta may contain labels and annotations that will be copied into the PVC
        when creating it. No other fields are allowed and will be rejected during
        validation.
    """
    spec: 'ResourceClaimSpec'
    metadata: 'Optional[meta_v1.ObjectMeta]' = None


@dataclass
class ResourceClass(DictMixin):
    """ResourceClass is used by administrators to influence how resources are
      allocated.
      
      This is an alpha type and requires enabling the DynamicResourceAllocation
      feature gate.

      **parameters**

      * **driverName** ``str`` - DriverName defines the name of the dynamic resource driver that is used for
        allocation of a ResourceClaim that uses this class.
        Resource drivers have a unique name in forward domain order
        (acme.example.com).
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
      * **parametersRef** ``Optional[ResourceClassParametersReference]`` - ParametersRef references an arbitrary separate object that may hold parameters
        that will be used by the driver when allocating a resource that uses this
        class. A dynamic resource driver can distinguish between parameters stored
        here and and those stored in ResourceClaimSpec.
      * **structuredParameters** ``Optional[bool]`` - If and only if allocation of claims using this class is handled via structured
        parameters, then StructuredParameters must be set to true.
      * **suitableNodes** ``Optional[core_v1.NodeSelector]`` - Only nodes matching the selector will be considered by the scheduler when
        trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that
        has not been allocated yet.
        Setting this field is optional. If null, all nodes are candidates.
    """
    driverName: 'str'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    parametersRef: 'Optional[ResourceClassParametersReference]' = None
    structuredParameters: 'Optional[bool]' = None
    suitableNodes: 'Optional[core_v1.NodeSelector]' = None


@dataclass
class ResourceClassList(DictMixin):
    """ResourceClassList is a collection of classes.

      **parameters**

      * **items** ``List[ResourceClass]`` - Items is the list of resource classes.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[ResourceClass]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class ResourceClassParameters(DictMixin):
    """ResourceClassParameters defines resource requests for a ResourceClass in an
      in-tree format understood by Kubernetes.

      **parameters**

      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **filters** ``Optional[List[ResourceFilter]]`` - Filters describes additional contraints that must be met when using the class.
      * **generatedFrom** ``Optional[ResourceClassParametersReference]`` - If this object was created from some other resource, then this links back to
        that resource. This field is used to find the in-tree representation of the
        class parameters when the parameter reference of the class refers to some
        unknown type.
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
      * **vendorParameters** ``Optional[List[VendorParameters]]`` - VendorParameters are arbitrary setup parameters for all claims using this
        class. They are ignored while allocating the claim. There must not be more
        than one entry per driver.
    """
    apiVersion: 'Optional[str]' = None
    filters: 'Optional[List[ResourceFilter]]' = None
    generatedFrom: 'Optional[ResourceClassParametersReference]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    vendorParameters: 'Optional[List[VendorParameters]]' = None


@dataclass
class ResourceClassParametersList(DictMixin):
    """ResourceClassParametersList is a collection of ResourceClassParameters.

      **parameters**

      * **items** ``List[ResourceClassParameters]`` - Items is the list of node resource capacity objects.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[ResourceClassParameters]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class ResourceClassParametersReference(DictMixin):
    """ResourceClassParametersReference contains enough information to let you locate
      the parameters for a ResourceClass.

      **parameters**

      * **kind** ``str`` - Kind is the type of resource being referenced. This is the same value as in
        the parameter object's metadata.
      * **name** ``str`` - Name is the name of resource being referenced.
      * **apiGroup** ``Optional[str]`` - APIGroup is the group for the resource being referenced. It is empty for the
        core API. This matches the group in the APIVersion that is used when creating
        the resources.
      * **namespace** ``Optional[str]`` - Namespace that contains the referenced resource. Must be empty for
        cluster-scoped resources and non-empty for namespaced resources.
    """
    kind: 'str'
    name: 'str'
    apiGroup: 'Optional[str]' = None
    namespace: 'Optional[str]' = None


@dataclass
class ResourceFilter(DictMixin):
    """ResourceFilter is a filter for resources from one particular driver.

      **parameters**

      * **driverName** ``Optional[str]`` - DriverName is the name used by the DRA driver kubelet plugin.
      * **namedResources** ``Optional[NamedResourcesFilter]`` - NamedResources describes a resource filter using the named resources model.
    """
    driverName: 'Optional[str]' = None
    namedResources: 'Optional[NamedResourcesFilter]' = None


@dataclass
class ResourceHandle(DictMixin):
    """ResourceHandle holds opaque resource data for processing by a specific kubelet
      plugin.

      **parameters**

      * **data** ``Optional[str]`` - Data contains the opaque data associated with this ResourceHandle. It is set
        by the controller component of the resource driver whose name matches the
        DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in.
        It is set at allocation time and is intended for processing by the kubelet
        plugin whose name matches the DriverName set in this ResourceHandle.
        The maximum size of this field is 16KiB. This may get increased in the future,
        but not reduced.
      * **driverName** ``Optional[str]`` - DriverName specifies the name of the resource driver whose kubelet plugin
        should be invoked to process this ResourceHandle's data once it lands on a
        node. This may differ from the DriverName set in ResourceClaimStatus this
        ResourceHandle is embedded in.
      * **structuredData** ``Optional[StructuredResourceHandle]`` - If StructuredData is set, then it needs to be used instead of Data.
    """
    data: 'Optional[str]' = None
    driverName: 'Optional[str]' = None
    structuredData: 'Optional[StructuredResourceHandle]' = None


@dataclass
class ResourceRequest(DictMixin):
    """ResourceRequest is a request for resources from one particular driver.

      **parameters**

      * **namedResources** ``Optional[NamedResourcesRequest]`` - NamedResources describes a request for resources with the named resources
        model.
      * **vendorParameters** ``Optional[runtime.RawExtension]`` - VendorParameters are arbitrary setup parameters for the requested resource.
        They are ignored while allocating a claim.
    """
    namedResources: 'Optional[NamedResourcesRequest]' = None
    vendorParameters: 'Optional[runtime.RawExtension]' = None


@dataclass
class ResourceSlice(DictMixin):
    """ResourceSlice provides information about available resources on individual
      nodes.

      **parameters**

      * **driverName** ``str`` - DriverName identifies the DRA driver providing the capacity information. A
        field selector can be used to list only ResourceSlice objects with a certain
        driver name.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - Standard object metadata
      * **namedResources** ``Optional[NamedResourcesResources]`` - NamedResources describes available resources using the named resources model.
      * **nodeName** ``Optional[str]`` - NodeName identifies the node which provides the resources if they are local to
        a node.
        A field selector can be used to list only ResourceSlice objects with a certain
        node name.
    """
    driverName: 'str'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    namedResources: 'Optional[NamedResourcesResources]' = None
    nodeName: 'Optional[str]' = None


@dataclass
class ResourceSliceList(DictMixin):
    """ResourceSliceList is a collection of ResourceSlices.

      **parameters**

      * **items** ``List[ResourceSlice]`` - Items is the list of node resource capacity objects.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata
    """
    items: 'List[ResourceSlice]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class StructuredResourceHandle(DictMixin):
    """StructuredResourceHandle is the in-tree representation of the allocation
      result.

      **parameters**

      * **results** ``List[DriverAllocationResult]`` - Results lists all allocated driver resources.
      * **nodeName** ``Optional[str]`` - NodeName is the name of the node providing the necessary resources if the
        resources are local to a node.
      * **vendorClaimParameters** ``Optional[runtime.RawExtension]`` - VendorClaimParameters are the per-claim configuration parameters from the
        resource claim parameters at the time that the claim was allocated.
      * **vendorClassParameters** ``Optional[runtime.RawExtension]`` - VendorClassParameters are the per-claim configuration parameters from the
        resource class at the time that the claim was allocated.
    """
    results: 'List[DriverAllocationResult]'
    nodeName: 'Optional[str]' = None
    vendorClaimParameters: 'Optional[runtime.RawExtension]' = None
    vendorClassParameters: 'Optional[runtime.RawExtension]' = None


@dataclass
class VendorParameters(DictMixin):
    """VendorParameters are opaque parameters for one particular driver.

      **parameters**

      * **driverName** ``Optional[str]`` - DriverName is the name used by the DRA driver kubelet plugin.
      * **parameters** ``Optional[runtime.RawExtension]`` - Parameters can be arbitrary setup parameters. They are ignored while
        allocating a claim.
    """
    driverName: 'Optional[str]' = None
    parameters: 'Optional[runtime.RawExtension]' = None


