
    >gF,                     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.32
    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)V1alpha2LeaseCandidateSpeczNOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    strdatetime)binary_versionemulation_version
lease_name	ping_time
renew_timestrategybinaryVersionemulationVersion	leaseNamepingTime	renewTimer   Nc                     |
t               }|| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        || _	        ||| _
        || _        ||| _        ||| _        || _        y)z7V1alpha2LeaseCandidateSpec - a model defined in OpenAPIN)r   local_vars_configuration_binary_version_emulation_version_lease_name
_ping_time_renew_time	_strategydiscriminatorr   r	   r
   r   r   r   )selfr   r	   r
   r   r   r   r   s           k/var/www/openai/venv/lib/python3.12/site-packages/kubernetes/client/models/v1alpha2_lease_candidate_spec.py__init__z#V1alpha2LeaseCandidateSpec.__init__5   s    #+'4$(@%#"&!,(%6D"$ &DN!(DO     c                     | j                   S )aD  Gets the binary_version of this V1alpha2LeaseCandidateSpec.  # noqa: E501

        BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.  # noqa: E501

        :return: The binary_version of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :rtype: str
        )r   r   s    r   r   z)V1alpha2LeaseCandidateSpec.binary_versionM   s     ###r   c                 X    | j                   j                  r|t        d      || _        y)aC  Sets the binary_version of this V1alpha2LeaseCandidateSpec.

        BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.  # noqa: E501

        :param binary_version: The binary_version of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :type: str
        Nz6Invalid value for `binary_version`, must not be `None`)r   client_side_validation
ValueErrorr   )r   r   s     r   r   z)V1alpha2LeaseCandidateSpec.binary_versionX   s,     ((??NDZUVV-r   c                     | j                   S )a  Gets the emulation_version of this V1alpha2LeaseCandidateSpec.  # noqa: E501

        EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is "OldestEmulationVersion"  # noqa: E501

        :return: The emulation_version of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :rtype: str
        r   r!   s    r   r	   z,V1alpha2LeaseCandidateSpec.emulation_versionf   s     &&&r   c                     || _         y)a  Sets the emulation_version of this V1alpha2LeaseCandidateSpec.

        EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is "OldestEmulationVersion"  # noqa: E501

        :param emulation_version: The emulation_version of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :type: str
        Nr&   )r   r	   s     r   r	   z,V1alpha2LeaseCandidateSpec.emulation_versionq   s     #4r   c                     | j                   S )a0  Gets the lease_name of this V1alpha2LeaseCandidateSpec.  # noqa: E501

        LeaseName is the name of the lease for which this candidate is contending. This field is immutable.  # noqa: E501

        :return: The lease_name of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :rtype: str
        )r   r!   s    r   r
   z%V1alpha2LeaseCandidateSpec.lease_name}        r   c                 X    | j                   j                  r|t        d      || _        y)a+  Sets the lease_name of this V1alpha2LeaseCandidateSpec.

        LeaseName is the name of the lease for which this candidate is contending. This field is immutable.  # noqa: E501

        :param lease_name: The lease_name of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :type: str
        Nz2Invalid value for `lease_name`, must not be `None`)r   r#   r$   r   )r   r
   s     r   r
   z%V1alpha2LeaseCandidateSpec.lease_name   s,     ((??JDVQRR%r   c                     | j                   S )a  Gets the ping_time of this V1alpha2LeaseCandidateSpec.  # noqa: E501

        PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.  # noqa: E501

        :return: The ping_time of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :rtype: datetime
        r   r!   s    r   r   z$V1alpha2LeaseCandidateSpec.ping_time   s     r   c                     || _         y)a  Sets the ping_time of this V1alpha2LeaseCandidateSpec.

        PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.  # noqa: E501

        :param ping_time: The ping_time of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :type: datetime
        Nr,   )r   r   s     r   r   z$V1alpha2LeaseCandidateSpec.ping_time   s     $r   c                     | j                   S )am  Gets the renew_time of this V1alpha2LeaseCandidateSpec.  # noqa: E501

        RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.  # noqa: E501

        :return: The renew_time of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :rtype: datetime
        r   r!   s    r   r   z%V1alpha2LeaseCandidateSpec.renew_time   r)   r   c                     || _         y)ah  Sets the renew_time of this V1alpha2LeaseCandidateSpec.

        RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.  # noqa: E501

        :param renew_time: The renew_time of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :type: datetime
        Nr/   )r   r   s     r   r   z%V1alpha2LeaseCandidateSpec.renew_time   s     &r   c                     | j                   S )a  Gets the strategy of this V1alpha2LeaseCandidateSpec.  # noqa: E501

        Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.  # noqa: E501

        :return: The strategy of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :rtype: str
        )r   r!   s    r   r   z#V1alpha2LeaseCandidateSpec.strategy   s     ~~r   c                 X    | j                   j                  r|t        d      || _        y)a  Sets the strategy of this V1alpha2LeaseCandidateSpec.

        Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.  # noqa: E501

        :param strategy: The strategy of this V1alpha2LeaseCandidateSpec.  # noqa: E501
        :type: str
        Nz0Invalid value for `strategy`, must not be `None`)r   r#   r$   r   )r   r   s     r   r   z#V1alpha2LeaseCandidateSpec.strategy   s+     ((??HDTOPP!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>z4V1alpha2LeaseCandidateSpec.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   z4V1alpha2LeaseCandidateSpec.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"V1alpha2LeaseCandidateSpec.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!V1alpha2LeaseCandidateSpec.to_str   s    ~~dlln--r   c                 "    | j                         S )zFor `print` and `pprint`)rM   r!   s    r   __repr__z#V1alpha2LeaseCandidateSpec.__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!V1alpha2LeaseCandidateSpec.__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!V1alpha2LeaseCandidateSpec.__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     " M */!!M!0 $ $ . . ' ' 	4 	4     & &   	$ 	$     	& 	&   __" "0.11r   r   )rZ   rK   rer=   kubernetes.client.configurationr   objectr   r^   r   r   <module>rb      s&     	 
 9t1 t1r   