
    Bvh1                     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)!V1beta2DeviceSubRequestzNOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    strintzlist[V1beta2DeviceSelector]zlist[V1beta2DeviceToleration])allocation_modecountdevice_class_namename	selectorstolerationsallocationModer	   deviceClassNamer   r   r   Nc                     |
t               }|| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        ||| _	        ||| _
        || _        || _        ||| _        ||| _        yy)z4V1beta2DeviceSubRequest - a model defined in OpenAPIN)r   local_vars_configuration_allocation_mode_count_device_class_name_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_device_sub_request.py__init__z V1beta2DeviceSubRequest.__init__5   s    #+'4$(@% $"&
 !&#2D DJ!2	 &DN"*D #    c                     | j                   S )a  Gets the allocation_mode of this V1beta2DeviceSubRequest.  # noqa: E501

        AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. 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 subrequest is for all of the matching devices in a pool.   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 subrequests 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 V1beta2DeviceSubRequest.  # noqa: E501
        :rtype: str
        r   r   s    r   r   z'V1beta2DeviceSubRequest.allocation_modeN   s     $$$r   c                     || _         y)a  Sets the allocation_mode of this V1beta2DeviceSubRequest.

        AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. 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 subrequest is for all of the matching devices in a pool.   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 subrequests 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 V1beta2DeviceSubRequest.  # noqa: E501
        :type: str
        Nr   )r   r   s     r   r   z'V1beta2DeviceSubRequest.allocation_modeY   s     !0r   c                     | j                   S )ad  Gets the count of this V1beta2DeviceSubRequest.  # 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 V1beta2DeviceSubRequest.  # noqa: E501
        :rtype: int
        r   r   s    r   r	   zV1beta2DeviceSubRequest.counte   s     {{r   c                     || _         y)aZ  Sets the count of this V1beta2DeviceSubRequest.

        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 V1beta2DeviceSubRequest.  # noqa: E501
        :type: int
        Nr"   )r   r	   s     r   r	   zV1beta2DeviceSubRequest.countp   s     r   c                     | j                   S )a  Gets the device_class_name of this V1beta2DeviceSubRequest.  # noqa: E501

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

        DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest.  A class is required. 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 V1beta2DeviceSubRequest.  # 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)V1beta2DeviceSubRequest.device_class_name   s-     ((??DUD]XYY"3r   c                     | j                   S )a  Gets the name of this V1beta2DeviceSubRequest.  # noqa: E501

        Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format <main request>/<subrequest>.  Must be a DNS label.  # noqa: E501

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

        Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format <main request>/<subrequest>.  Must be a DNS label.  # noqa: E501

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

        Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered.  # noqa: E501

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

        Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered.  # noqa: E501

        :param selectors: The selectors of this V1beta2DeviceSubRequest.  # noqa: E501
        :type: list[V1beta2DeviceSelector]
        Nr+   )r   r   s     r   r   z!V1beta2DeviceSubRequest.selectors   s     $r   c                     | j                   S )a`  Gets the tolerations of this V1beta2DeviceSubRequest.  # 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 V1beta2DeviceSubRequest.  # noqa: E501
        :rtype: list[V1beta2DeviceToleration]
        r   r   s    r   r   z#V1beta2DeviceSubRequest.tolerations   s        r   c                     || _         y)a\  Sets the tolerations of this V1beta2DeviceSubRequest.

        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 V1beta2DeviceSubRequest.  # noqa: E501
        :type: list[V1beta2DeviceToleration]
        Nr.   )r   r   s     r   r   z#V1beta2DeviceSubRequest.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hasattrr2   )xs    r   <lambda>z1V1beta2DeviceSubRequest.to_dict.<locals>.<lambda>   s    WQ	-BaiikIIr   r2   c                 T    t        | d   d      r| d   | d   j                         fS | S )N   r2   r   r3   )items    r   r6   z1V1beta2DeviceSubRequest.to_dict.<locals>.<lambda>   s6    tAw	2 #'q'47??+<!= "=8<"=r   )six	iteritemsopenapi_typesgetattr
isinstancelistmapr4   r2   dictitems)r   resultattr_values        r   r2   zV1beta2DeviceSubRequest.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pformatr2   r   s    r   to_strzV1beta2DeviceSubRequest.to_str   s    ~~dlln--r   c                 "    | j                         S )zFor `print` and `pprint`)rJ   r   s    r   __repr__z V1beta2DeviceSubRequest.__repr__   s    {{}r   c                 f    t        |t              sy| j                         |j                         k(  S )z&Returns true if both objects are equalFr>   r   r2   r   others     r   __eq__zV1beta2DeviceSubRequest.__eq__   s'    %!89||~00r   c                 f    t        |t              sy| j                         |j                         k7  S )z*Returns true if both objects are not equalTrN   rO   s     r   __ne__zV1beta2DeviceSubRequest.__ne__  s'    %!89||~00r   )NNNNNNN)__name__
__module____qualname____doc__r<   attribute_mapr   propertyr   setterr	   r
   r   r   r   r2   rJ   rL   rQ   rS    r   r   r   r      sp    !"26M ,. $M+2 % % 	0 	0   \\	 	 ' ' 4 4   
[[    	$ 	$ ! ! 	( 	(0.11r   r   )rW   rH   rer:   kubernetes.client.configurationr   objectr   r[   r   r   <module>r_      s&     	 
 9s1f s1r   