
    BvhG                     B    d Z ddlZddlZddlZddlmZ  G d de      Zy)z
    Kubernetes

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

    The version of the OpenAPI document: release-1.33
    Generated by: https://openapi-generator.tech
    N)Configurationc            	          e Zd ZdZ	 dddddddddZd	d
dddddddZd(dZed        Zej                  d        Zed        Z
e
j                  d        Z
ed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d        Zed        Zej                  d         Zed!        Zej                  d"        Zd# Zd$ Zd% Zd& Zd' Zy))V1beta1DeviceRequestzNOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    boolstrintzlist[V1beta1DeviceSubRequest]zlist[V1beta1DeviceSelector]zlist[V1beta1DeviceToleration])admin_accessallocation_modecountdevice_class_namefirst_availablename	selectorstolerationsadminAccessallocationModer   deviceClassNamefirstAvailabler   r   r   Nc
                 6   |	
t               }	|	| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _	        d| _
        ||| _        ||| _        ||| _        ||| _        ||| _        || _        ||| _        ||| _        yy)z1V1beta1DeviceRequest - a model defined in OpenAPIN)r   local_vars_configuration_admin_access_allocation_mode_count_device_class_name_first_available_name
_selectors_tolerationsdiscriminatorr	   r
   r   r   r   r   r   r   )
selfr	   r
   r   r   r   r   r   r   r   s
             Y/RAG/venv/lib/python3.12/site-packages/kubernetes/client/models/v1beta1_device_request.py__init__zV1beta1DeviceRequest.__init__9   s    #+'4$(@%! $"& $
 !# ,D&#2D DJ(%6D"&#2D 	 &DN"*D #    c                     | j                   S )a  Gets the admin_access of this V1beta1DeviceRequest.  # noqa: E501

        AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device.  They ignore all ordinary claims to the device with respect to access modes and any resource allocations.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.  # noqa: E501

        :return: The admin_access of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: bool
        r   r    s    r!   r	   z!V1beta1DeviceRequest.admin_accessY   s     !!!r#   c                     || _         y)a  Sets the admin_access of this V1beta1DeviceRequest.

        AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device.  They ignore all ordinary claims to the device with respect to access modes and any resource allocations.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.  # noqa: E501

        :param admin_access: The admin_access of this V1beta1DeviceRequest.  # noqa: E501
        :type: bool
        Nr%   )r    r	   s     r!   r	   z!V1beta1DeviceRequest.admin_accessd   s     *r#   c                     | j                   S )aU  Gets the allocation_mode of this V1beta1DeviceRequest.  # noqa: E501

        AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:  - ExactCount: This request is for a specific number of devices.   This is the default. The exact number is provided in the   count field.  - All: This request is for all of the matching devices in a pool.   At least one device must exist on the node for the allocation to succeed.   Allocation will fail if some devices are already allocated,   unless adminAccess is requested.  If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  More modes may get added in the future. Clients must refuse to handle requests with unknown modes.  # noqa: E501

        :return: The allocation_mode of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: str
        r   r&   s    r!   r
   z$V1beta1DeviceRequest.allocation_modep        $$$r#   c                     || _         y)aU  Sets the allocation_mode of this V1beta1DeviceRequest.

        AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:  - ExactCount: This request is for a specific number of devices.   This is the default. The exact number is provided in the   count field.  - All: This request is for all of the matching devices in a pool.   At least one device must exist on the node for the allocation to succeed.   Allocation will fail if some devices are already allocated,   unless adminAccess is requested.  If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  More modes may get added in the future. Clients must refuse to handle requests with unknown modes.  # noqa: E501

        :param allocation_mode: The allocation_mode of this V1beta1DeviceRequest.  # noqa: E501
        :type: str
        Nr)   )r    r
   s     r!   r
   z$V1beta1DeviceRequest.allocation_mode{        !0r#   c                     | j                   S )a  Gets the count of this V1beta1DeviceRequest.  # noqa: E501

        Count is used only when the count mode is "ExactCount". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  # noqa: E501

        :return: The count of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: int
        r   r&   s    r!   r   zV1beta1DeviceRequest.count   s     {{r#   c                     || _         y)a  Sets the count of this V1beta1DeviceRequest.

        Count is used only when the count mode is "ExactCount". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  # noqa: E501

        :param count: The count of this V1beta1DeviceRequest.  # noqa: E501
        :type: int
        Nr.   )r    r   s     r!   r   zV1beta1DeviceRequest.count   s     r#   c                     | j                   S )aA  Gets the device_class_name of this V1beta1DeviceRequest.  # noqa: E501

        DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A class is required if no subrequests are specified in the firstAvailable list and no class can be set if subrequests are specified in the firstAvailable list. Which classes are available depends on the cluster.  Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.  # noqa: E501

        :return: The device_class_name of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: str
        r   r&   s    r!   r   z&V1beta1DeviceRequest.device_class_name   s     &&&r#   c                     || _         y)aC  Sets the device_class_name of this V1beta1DeviceRequest.

        DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A class is required if no subrequests are specified in the firstAvailable list and no class can be set if subrequests are specified in the firstAvailable list. Which classes are available depends on the cluster.  Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.  # noqa: E501

        :param device_class_name: The device_class_name of this V1beta1DeviceRequest.  # noqa: E501
        :type: str
        Nr1   )r    r   s     r!   r   z&V1beta1DeviceRequest.device_class_name   s     #4r#   c                     | j                   S )a  Gets the first_available of this V1beta1DeviceRequest.  # noqa: E501

        FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used.  This field may only be set in the entries of DeviceClaim.Requests.  DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.  # noqa: E501

        :return: The first_available of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: list[V1beta1DeviceSubRequest]
        r   r&   s    r!   r   z$V1beta1DeviceRequest.first_available   r*   r#   c                     || _         y)a  Sets the first_available of this V1beta1DeviceRequest.

        FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used.  This field may only be set in the entries of DeviceClaim.Requests.  DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.  # noqa: E501

        :param first_available: The first_available of this V1beta1DeviceRequest.  # noqa: E501
        :type: list[V1beta1DeviceSubRequest]
        Nr4   )r    r   s     r!   r   z$V1beta1DeviceRequest.first_available   r,   r#   c                     | j                   S )a  Gets the name of this V1beta1DeviceRequest.  # noqa: E501

        Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.  Must be a DNS label and unique among all DeviceRequests in a ResourceClaim.  # noqa: E501

        :return: The name of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: str
        )r   r&   s    r!   r   zV1beta1DeviceRequest.name   s     zzr#   c                 X    | j                   j                  r|t        d      || _        y)au  Sets the name of this V1beta1DeviceRequest.

        Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.  Must be a DNS label and unique among all DeviceRequests in a ResourceClaim.  # noqa: E501

        :param name: The name of this V1beta1DeviceRequest.  # noqa: E501
        :type: str
        Nz,Invalid value for `name`, must not be `None`)r   client_side_validation
ValueErrorr   )r    r   s     r!   r   zV1beta1DeviceRequest.name   s*     ((??DLKLL
r#   c                     | j                   S )a  Gets the selectors of this V1beta1DeviceRequest.  # noqa: E501

        Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  # noqa: E501

        :return: The selectors of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: list[V1beta1DeviceSelector]
        r   r&   s    r!   r   zV1beta1DeviceRequest.selectors   s     r#   c                     || _         y)a  Sets the selectors of this V1beta1DeviceRequest.

        Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  # noqa: E501

        :param selectors: The selectors of this V1beta1DeviceRequest.  # noqa: E501
        :type: list[V1beta1DeviceSelector]
        Nr;   )r    r   s     r!   r   zV1beta1DeviceRequest.selectors   s     $r#   c                     | j                   S )a  Gets the tolerations of this V1beta1DeviceRequest.  # noqa: E501

        If specified, the request's tolerations.  Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.  In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.  The maximum number of tolerations is 16.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  This is an alpha field and requires enabling the DRADeviceTaints feature gate.  # noqa: E501

        :return: The tolerations of this V1beta1DeviceRequest.  # noqa: E501
        :rtype: list[V1beta1DeviceToleration]
        r   r&   s    r!   r   z V1beta1DeviceRequest.tolerations   s        r#   c                     || _         y)a  Sets the tolerations of this V1beta1DeviceRequest.

        If specified, the request's tolerations.  Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.  In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.  The maximum number of tolerations is 16.  This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.  This is an alpha field and requires enabling the DRADeviceTaints feature gate.  # noqa: E501

        :param tolerations: The tolerations of this V1beta1DeviceRequest.  # noqa: E501
        :type: list[V1beta1DeviceToleration]
        Nr>   )r    r   s     r!   r   z V1beta1DeviceRequest.tolerations  s     (r#   c                 ~   i }t        j                  | j                        D ]  \  }}t        | |      }t	        |t
              rt        t        d |            ||<   <t        |d      r|j                         ||<   \t	        |t              r(t        t        d |j                                     ||<   |||<    |S )z&Returns the model properties as a dictc                 >    t        | d      r| j                         S | S )Nto_dicthasattrrB   )xs    r!   <lambda>z.V1beta1DeviceRequest.to_dict.<locals>.<lambda>  s    WQ	-BaiikIIr#   rB   c                 T    t        | d   d      r| d   | d   j                         fS | S )N   rB   r   rC   )items    r!   rF   z.V1beta1DeviceRequest.to_dict.<locals>.<lambda>"  s6    tAw	2 #'q'47??+<!= "=8<"=r#   )six	iteritemsopenapi_typesgetattr
isinstancelistmaprD   rB   dictitems)r    resultattr_values        r!   rB   zV1beta1DeviceRequest.to_dict  s    }}T%7%78GD!D$'E%&#CI%  t 	*$}}tE4(#C=KKM%  t  %t! 9$ r#   c                 H    t        j                  | j                               S )z.Returns the string representation of the model)pprintpformatrB   r&   s    r!   to_strzV1beta1DeviceRequest.to_str+  s    ~~dlln--r#   c                 "    | j                         S )zFor `print` and `pprint`)rZ   r&   s    r!   __repr__zV1beta1DeviceRequest.__repr__/  s    {{}r#   c                 f    t        |t              sy| j                         |j                         k(  S )z&Returns true if both objects are equalFrN   r   rB   r    others     r!   __eq__zV1beta1DeviceRequest.__eq__3  s'    %!56||~00r#   c                 f    t        |t              sy| j                         |j                         k7  S )z*Returns true if both objects are not equalTr^   r_   s     r!   __ne__zV1beta1DeviceRequest.__ne__:  s'    %!56||~00r#   )	NNNNNNNNN)__name__
__module____qualname____doc__rL   attribute_mapr"   propertyr	   setterr
   r   r   r   r   r   r   rB   rZ   r\   ra   rc    r#   r!   r   r      s     ":26	M &+.+ $	M+@ " " 	* 	* % % 	0 	0   \\	 	 ' ' 	4 	4 % % 	0 	0   
[[    	$ 	$ ! ! 	( 	(0.11r#   r   )rg   rX   rerJ   kubernetes.client.configurationr   objectr   rk   r#   r!   <module>ro      s&     	 
 9j16 j1r#   