
    Bvha4                     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Z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d Zd Zd Zd Zd  Zy)"V1beta2ExactDeviceRequestzNOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    boolstrintzlist[V1beta2DeviceSelector]zlist[V1beta2DeviceToleration])admin_accessallocation_modecountdevice_class_name	selectorstolerationsadminAccessallocationModer   deviceClassNamer   r   Nc                     |
t               }|| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        ||| _	        ||| _
        ||| _        || _        ||| _        ||| _        yy)z6V1beta2ExactDeviceRequest - a model defined in OpenAPIN)r   local_vars_configuration_admin_access_allocation_mode_count_device_class_name
_selectors_tolerationsdiscriminatorr	   r
   r   r   r   r   )selfr	   r
   r   r   r   r   r   s           _/RAG/venv/lib/python3.12/site-packages/kubernetes/client/models/v1beta2_exact_device_request.py__init__z"V1beta2ExactDeviceRequest.__init__5   s    #+'4$(@%! $"& !# ,D&#2D DJ!2 &DN"*D #    c                     | j                   S )a  Gets the admin_access of this V1beta2ExactDeviceRequest.  # 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 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 V1beta2ExactDeviceRequest.  # noqa: E501
        :rtype: bool
        r   r   s    r   r	   z&V1beta2ExactDeviceRequest.admin_accessO   s     !!!r   c                     || _         y)a  Sets the admin_access of this V1beta2ExactDeviceRequest.

        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 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 V1beta2ExactDeviceRequest.  # noqa: E501
        :type: bool
        Nr    )r   r	   s     r   r	   z&V1beta2ExactDeviceRequest.admin_accessZ   s     *r   c                     | j                   S )a  Gets the allocation_mode of this V1beta2ExactDeviceRequest.  # 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.  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 V1beta2ExactDeviceRequest.  # noqa: E501
        :rtype: str
        r   r!   s    r   r
   z)V1beta2ExactDeviceRequest.allocation_modef   s     $$$r   c                     || _         y)a  Sets the allocation_mode of this V1beta2ExactDeviceRequest.

        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.  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 V1beta2ExactDeviceRequest.  # noqa: E501
        :type: str
        Nr$   )r   r
   s     r   r
   z)V1beta2ExactDeviceRequest.allocation_modeq   s     !0r   c                     | j                   S )ah  Gets the count of this V1beta2ExactDeviceRequest.  # 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.  # noqa: E501

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

        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.  # noqa: E501

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

        DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A DeviceClassName is required.  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 V1beta2ExactDeviceRequest.  # noqa: E501
        :rtype: str
        )r   r!   s    r   r   z+V1beta2ExactDeviceRequest.device_class_name   s     &&&r   c                 X    | j                   j                  r|t        d      || _        y)a  Sets the device_class_name of this V1beta2ExactDeviceRequest.

        DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.  A DeviceClassName is required.  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 V1beta2ExactDeviceRequest.  # noqa: E501
        :type: str
        Nz9Invalid value for `device_class_name`, must not be `None`)r   client_side_validation
ValueErrorr   )r   r   s     r   r   z+V1beta2ExactDeviceRequest.device_class_name   s-     ((??DUD]XYY"3r   c                     | j                   S )a  Gets the selectors of this V1beta2ExactDeviceRequest.  # 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.  # noqa: E501

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

        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.  # noqa: E501

        :param selectors: The selectors of this V1beta2ExactDeviceRequest.  # noqa: E501
        :type: list[V1beta2DeviceSelector]
        Nr.   )r   r   s     r   r   z#V1beta2ExactDeviceRequest.selectors   s     $r   c                     | j                   S )ad  Gets the tolerations of this V1beta2ExactDeviceRequest.  # 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 is an alpha field and requires enabling the DRADeviceTaints feature gate.  # noqa: E501

        :return: The tolerations of this V1beta2ExactDeviceRequest.  # noqa: E501
        :rtype: list[V1beta2DeviceToleration]
        r   r!   s    r   r   z%V1beta2ExactDeviceRequest.tolerations   s        r   c                     || _         y)a`  Sets the tolerations of this V1beta2ExactDeviceRequest.

        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 is an alpha field and requires enabling the DRADeviceTaints feature gate.  # noqa: E501

        :param tolerations: The tolerations of this V1beta2ExactDeviceRequest.  # noqa: E501
        :type: list[V1beta2DeviceToleration]
        Nr1   )r   r   s     r   r   z%V1beta2ExactDeviceRequest.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hasattrr5   )xs    r   <lambda>z3V1beta2ExactDeviceRequest.to_dict.<locals>.<lambda>   s    WQ	-BaiikIIr   r5   c                 T    t        | d   d      r| d   | d   j                         fS | S )N   r5   r   r6   )items    r   r9   z3V1beta2ExactDeviceRequest.to_dict.<locals>.<lambda>   s6    tAw	2 #'q'47??+<!= "=8<"=r   )six	iteritemsopenapi_typesgetattr
isinstancelistmapr7   r5   dictitems)r   resultattr_values        r   r5   z!V1beta2ExactDeviceRequest.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pformatr5   r!   s    r   to_strz V1beta2ExactDeviceRequest.to_str   s    ~~dlln--r   c                 "    | j                         S )zFor `print` and `pprint`)rM   r!   s    r   __repr__z"V1beta2ExactDeviceRequest.__repr__   s    {{}r   c                 f    t        |t              sy| j                         |j                         k(  S )z&Returns true if both objects are equalFrA   r   r5   r   others     r   __eq__z V1beta2ExactDeviceRequest.__eq__   s'    %!:;||~00r   c                 f    t        |t              sy| j                         |j                         k7  S )z*Returns true if both objects are not equalTrQ   rR   s     r   __ne__z V1beta2ExactDeviceRequest.__ne__  s'    %!:;||~00r   )NNNNNNN)__name__
__module____qualname____doc__r?   attribute_mapr   propertyr	   setterr
   r   r   r   r   r5   rM   rO   rT   rV    r   r   r   r      sr     "26M &+. $M+4 " " 	* 	* % % 	0 	0   \\	 	 ' ' 4 4   	$ 	$ ! ! 	( 	(0.11r   r   )rZ   rK   rer=   kubernetes.client.configurationr   objectr   r^   r   r   <module>rb      s&     	 
 9r1 r1r   