
    =                     >    d Z ddlmZ ddlmZ ddlZ G d de      Zy)z
    Kubernetes

    No description provided (generated by Swagger Codegen
    https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: v1.14.4

    Generated by: https://github.com/swagger-api/swagger-codegen.git
    )pformat)	iteritemsNc            	          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))V1beta1Webhookzw
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    z	list[str]/AdmissionregistrationV1beta1WebhookClientConfigstrV1LabelSelectorzlist[V1beta1RuleWithOperations]int)admission_review_versionsclient_configfailure_policynamenamespace_selectorrulesside_effectstimeout_secondsadmissionReviewVersionsclientConfigfailurePolicyr   namespaceSelectorr   sideEffectstimeoutSecondsNc	                    d| _         d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        ||| _	        || _
        ||| _        || _        ||| _        ||| _        ||| _        ||| _        yy)z=
        V1beta1Webhook - a model defined in Swagger
        N)_admission_review_versions_client_config_failure_policy_name_namespace_selector_rules_side_effects_timeout_secondsdiscriminatorr   r   r   r   r   r   r   r   )	selfr   r   r   r   r   r   r   r   s	            ;lib/third_party/kubernetes/client/models/v1beta1_webhook.py__init__zV1beta1Webhook.__init__4   s     '+D#DDDJ#DDKD DD ,'@d$&D!*dDI% 2ddj&d",d #    c                     | j                   S )a  
        Gets the admission_review_versions of this V1beta1Webhook.
        AdmissionReviewVersions is an ordered list of preferred
        `AdmissionReview` versions the Webhook expects. API server will try to
        use first version in the list which it supports. If none of the versions
        specified in this list supported by API server, validation will fail for
        this object. If a persisted webhook configuration specifies allowed
        versions and does not include any versions known to the API Server,
        calls to the webhook will fail and be subject to the failure policy.
        Default to `['v1beta1']`.

        :return: The admission_review_versions of this V1beta1Webhook.
        :rtype: list[str]
        r   r#   s    r$   r   z(V1beta1Webhook.admission_review_versionsZ   s      ***r&   c                     || _         y)a  
        Sets the admission_review_versions of this V1beta1Webhook.
        AdmissionReviewVersions is an ordered list of preferred
        `AdmissionReview` versions the Webhook expects. API server will try to
        use first version in the list which it supports. If none of the versions
        specified in this list supported by API server, validation will fail for
        this object. If a persisted webhook configuration specifies allowed
        versions and does not include any versions known to the API Server,
        calls to the webhook will fail and be subject to the failure policy.
        Default to `['v1beta1']`.

        :param admission_review_versions: The admission_review_versions of this
        V1beta1Webhook.
        :type: list[str]
        Nr(   )r#   r   s     r$   r   z(V1beta1Webhook.admission_review_versionsl   s    $ '@D#r&   c                     | j                   S )a  
        Gets the client_config of this V1beta1Webhook.
        ClientConfig defines how to communicate with the hook. Required

        :return: The client_config of this V1beta1Webhook.
        :rtype: AdmissionregistrationV1beta1WebhookClientConfig
        )r   r)   s    r$   r   zV1beta1Webhook.client_config   s     r&   c                 ,    |t        d      || _        y)a  
        Sets the client_config of this V1beta1Webhook.
        ClientConfig defines how to communicate with the hook. Required

        :param client_config: The client_config of this V1beta1Webhook.
        :type: AdmissionregistrationV1beta1WebhookClientConfig
        Nz5Invalid value for `client_config`, must not be `None`)
ValueErrorr   )r#   r   s     r$   r   zV1beta1Webhook.client_config   s     NOO'Dr&   c                     | j                   S )a9  
        Gets the failure_policy of this V1beta1Webhook.
        FailurePolicy defines how unrecognized errors from the admission
        endpoint are handled - allowed values are Ignore or Fail. Defaults to
        Ignore.

        :return: The failure_policy of this V1beta1Webhook.
        :rtype: str
        r   r)   s    r$   r   zV1beta1Webhook.failure_policy   s     r&   c                     || _         y)aF  
        Sets the failure_policy of this V1beta1Webhook.
        FailurePolicy defines how unrecognized errors from the admission
        endpoint are handled - allowed values are Ignore or Fail. Defaults to
        Ignore.

        :param failure_policy: The failure_policy of this V1beta1Webhook.
        :type: str
        Nr/   )r#   r   s     r$   r   zV1beta1Webhook.failure_policy   s     *Dr&   c                     | j                   S )ag  
        Gets the name of this V1beta1Webhook.
        The name of the admission webhook. Name should be fully qualified, e.g.,
        imagepolicy.kubernetes.io, where "imagepolicy" is the name of the
        webhook, and kubernetes.io is the name of the organization. Required.

        :return: The name of this V1beta1Webhook.
        :rtype: str
        )r   r)   s    r$   r   zV1beta1Webhook.name   s     ::r&   c                 ,    |t        d      || _        y)aj  
        Sets the name of this V1beta1Webhook.
        The name of the admission webhook. Name should be fully qualified, e.g.,
        imagepolicy.kubernetes.io, where "imagepolicy" is the name of the
        webhook, and kubernetes.io is the name of the organization. Required.

        :param name: The name of this V1beta1Webhook.
        :type: str
        Nz,Invalid value for `name`, must not be `None`)r-   r   )r#   r   s     r$   r   zV1beta1Webhook.name   s     |EFFDJr&   c                     | j                   S )a  
        Gets the namespace_selector of this V1beta1Webhook.
        NamespaceSelector decides whether to run the webhook on an object based
        on whether the namespace for that object matches the selector. If the
        object itself is a namespace, the matching is performed on
        object.metadata.labels. If the object is another cluster scoped
        resource, it never skips the webhook.  For example, to run the webhook
        on any objects whose namespace is not associated with "runlevel" of
        "0" or "1";  you will set the selector as follows:
        "namespaceSelector": {   "matchExpressions": [     {       "key":
        "runlevel",       "operator": "NotIn",       "values": [
        "0",         "1"       ]     }   ] }  If instead you want to only
        run the webhook on any objects whose namespace is associated with the
        "environment" of "prod" or "staging"; you will set the selector as
        follows: "namespaceSelector": {   "matchExpressions": [     {
        "key": "environment",       "operator": "In",       "values":
        [         "prod",         "staging"       ]     }   ] }  See
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
        for more examples of label selectors.  Default to the empty
        LabelSelector, which matches everything.

        :return: The namespace_selector of this V1beta1Webhook.
        :rtype: V1LabelSelector
        r   r)   s    r$   r   z!V1beta1Webhook.namespace_selector   s    4 ###r&   c                     || _         y)a  
        Sets the namespace_selector of this V1beta1Webhook.
        NamespaceSelector decides whether to run the webhook on an object based
        on whether the namespace for that object matches the selector. If the
        object itself is a namespace, the matching is performed on
        object.metadata.labels. If the object is another cluster scoped
        resource, it never skips the webhook.  For example, to run the webhook
        on any objects whose namespace is not associated with "runlevel" of
        "0" or "1";  you will set the selector as follows:
        "namespaceSelector": {   "matchExpressions": [     {       "key":
        "runlevel",       "operator": "NotIn",       "values": [
        "0",         "1"       ]     }   ] }  If instead you want to only
        run the webhook on any objects whose namespace is associated with the
        "environment" of "prod" or "staging"; you will set the selector as
        follows: "namespaceSelector": {   "matchExpressions": [     {
        "key": "environment",       "operator": "In",       "values":
        [         "prod",         "staging"       ]     }   ] }  See
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
        for more examples of label selectors.  Default to the empty
        LabelSelector, which matches everything.

        :param namespace_selector: The namespace_selector of this
        V1beta1Webhook.
        :type: V1LabelSelector
        Nr4   )r#   r   s     r$   r   z!V1beta1Webhook.namespace_selector   s    8  2Dr&   c                     | j                   S )a  
        Gets the rules of this V1beta1Webhook.
        Rules describes what operations on what resources/subresources the
        webhook cares about. The webhook cares about an operation if it matches
        _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and
        MutatingAdmissionWebhooks from putting the cluster in a state which
        cannot be recovered from without completely disabling the plugin,
        ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never
        called on admission requests for ValidatingWebhookConfiguration and
        MutatingWebhookConfiguration objects.

        :return: The rules of this V1beta1Webhook.
        :rtype: list[V1beta1RuleWithOperations]
        r   r)   s    r$   r   zV1beta1Webhook.rules  s      ;;r&   c                     || _         y)a  
        Sets the rules of this V1beta1Webhook.
        Rules describes what operations on what resources/subresources the
        webhook cares about. The webhook cares about an operation if it matches
        _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and
        MutatingAdmissionWebhooks from putting the cluster in a state which
        cannot be recovered from without completely disabling the plugin,
        ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never
        called on admission requests for ValidatingWebhookConfiguration and
        MutatingWebhookConfiguration objects.

        :param rules: The rules of this V1beta1Webhook.
        :type: list[V1beta1RuleWithOperations]
        Nr7   )r#   r   s     r$   r   zV1beta1Webhook.rules  s    " DKr&   c                     | j                   S )a  
        Gets the side_effects of this V1beta1Webhook.
        SideEffects states whether this webhookk has side effects. Acceptable
        values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects
        MUST implement a reconciliation system, since a request may be rejected
        by a future step in the admission change and the side effects therefore
        need to be undone. Requests with the dryRun attribute will be
        auto-rejected if they match a webhook with sideEffects == Unknown or
        Some. Defaults to Unknown.

        :return: The side_effects of this V1beta1Webhook.
        :rtype: str
        r    r)   s    r$   r   zV1beta1Webhook.side_effects0  s     r&   c                     || _         y)a  
        Sets the side_effects of this V1beta1Webhook.
        SideEffects states whether this webhookk has side effects. Acceptable
        values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects
        MUST implement a reconciliation system, since a request may be rejected
        by a future step in the admission change and the side effects therefore
        need to be undone. Requests with the dryRun attribute will be
        auto-rejected if they match a webhook with sideEffects == Unknown or
        Some. Defaults to Unknown.

        :param side_effects: The side_effects of this V1beta1Webhook.
        :type: str
        Nr:   )r#   r   s     r$   r   zV1beta1Webhook.side_effectsA  s      &Dr&   c                     | j                   S )a  
        Gets the timeout_seconds of this V1beta1Webhook.
        TimeoutSeconds specifies the timeout for this webhook. After the timeout
        passes, the webhook call will be ignored or the API call will fail based
        on the failure policy. The timeout value must be between 1 and 30
        seconds. Default to 30 seconds.

        :return: The timeout_seconds of this V1beta1Webhook.
        :rtype: int
        r!   r)   s    r$   r   zV1beta1Webhook.timeout_secondsS  s        r&   c                     || _         y)a  
        Sets the timeout_seconds of this V1beta1Webhook.
        TimeoutSeconds specifies the timeout for this webhook. After the timeout
        passes, the webhook call will be ignored or the API call will fail based
        on the failure policy. The timeout value must be between 1 and 30
        seconds. Default to 30 seconds.

        :param timeout_seconds: The timeout_seconds of this V1beta1Webhook.
        :type: int
        Nr=   )r#   r   s     r$   r   zV1beta1Webhook.timeout_secondsa  s     ,Dr&   c                 j   i }t        | j                        D ]  \  }}t        | |      }t        |t              rt	        t        d |            ||<   <t        |d      r|j                         ||<   \t        |t              r(t        t        d |j                                     ||<   |||<    |S )z8
        Returns the model properties as a dict
        c                 >    t        | d      r| j                         S | S )Nto_dicthasattrrA   )xs    r$   <lambda>z(V1beta1Webhook.to_dict.<locals>.<lambda>z  s    I)>!))+EAEr&   rA   c                 T    t        | d   d      r| d   | d   j                         fS | S )N   rA   r   rB   )items    r$   rE   z(V1beta1Webhook.to_dict.<locals>.<lambda>  s6    47I. #1gtAw'89 9489r&   )
r   swagger_typesgetattr
isinstancelistmaprC   rA   dictitems)r#   resultattr_values        r$   rA   zV1beta1Webhook.to_dictp  s     FT//0adD!e	E4	 EuMOt5)$}}teT"9:?++-IJt
 t 1 Mr&   c                 4    t        | j                               S )z@
        Returns the string representation of the model
        )r   rA   r)   s    r$   to_strzV1beta1Webhook.to_str  s     4<<>""r&   c                 "    | j                         S )z*
        For `print` and `pprint`
        )rU   r)   s    r$   __repr__zV1beta1Webhook.__repr__  s     ;;=r&   c                 V    t        |t              sy| j                  |j                  k(  S )z8
        Returns true if both objects are equal
        F)rK   r   __dict__r#   others     r$   __eq__zV1beta1Webhook.__eq__  s$     e^,==ENN**r&   c                     | |k(   S )z<
        Returns true if both objects are not equal
         rZ   s     r$   __ne__zV1beta1Webhook.__ne__  s     u}r&   )NNNNNNNN)__name__
__module____qualname____doc__rI   attribute_mapr%   propertyr   setterr   r   r   r   r   r   r   rA   rU   rW   r\   r_   r^   r&   r$   r   r      s    $/H-0	- $=%'/#)	- *.!""& #$-L + +" ##@ $@&   ( ( 
  
  * * 
 
 ;;  $ $6 2 2:  " 	<< $    & &" ! ! , ,.#+r&   r   )rc   pprintr   sixr   reobjectr   r^   r&   r$   <module>rk      s#   	   	NV Nr&   