
    <gZ                     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dddddd	Zd
dddddddddddd	Zd5d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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d0 Zd1 Zd2 Zd3 Zd4 Zy)6V1MutatingWebhookzNOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    z	list[str]*AdmissionregistrationV1WebhookClientConfigstrzlist[V1MatchCondition]V1LabelSelectorzlist[V1RuleWithOperations]int)admission_review_versionsclient_configfailure_policymatch_conditionsmatch_policynamenamespace_selectorobject_selectorreinvocation_policyrulesside_effectstimeout_secondsadmissionReviewVersionsclientConfigfailurePolicymatchConditionsmatchPolicyr   namespaceSelectorobjectSelectorreinvocationPolicyr   sideEffectstimeoutSecondsNc                    |
t               }|| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _	        d| _
        d| _        d| _        d| _        d| _        || _        || _        ||| _        ||| _        ||| _        || _        ||| _        ||| _        |	|	| _        |
|
| _        || _        ||| _        yy)z.V1MutatingWebhook - a model defined in OpenAPIN)r   local_vars_configuration_admission_review_versions_client_config_failure_policy_match_conditions_match_policy_name_namespace_selector_object_selector_reinvocation_policy_rules_side_effects_timeout_secondsdiscriminatorr
   r   r   r   r   r   r   r   r   r   r   r   )selfr
   r   r   r   r   r   r   r   r   r   r   r   r!   s                 a/var/www/openai/venv/lib/python3.12/site-packages/kubernetes/client/models/v1_mutating_webhook.py__init__zV1MutatingWebhook.__init__A   s   #+'4$(@%*.'"#!%!
#'  $$(!! $!)B&*%"0D'$4D!# ,D	)&8D#&#2D *':D$DJ(&#2D  '    c                     | j                   S )a  Gets the admission_review_versions of this V1MutatingWebhook.  # noqa: E501

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

        :return: The admission_review_versions of this V1MutatingWebhook.  # noqa: E501
        :rtype: list[str]
        )r"   r/   s    r0   r
   z+V1MutatingWebhook.admission_review_versionsj   s     ...r2   c                 X    | j                   j                  r|t        d      || _        y)a  Sets the admission_review_versions of this V1MutatingWebhook.

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

        :param admission_review_versions: The admission_review_versions of this V1MutatingWebhook.  # noqa: E501
        :type: list[str]
        NzAInvalid value for `admission_review_versions`, must not be `None`)r!   client_side_validation
ValueErrorr"   )r/   r
   s     r0   r
   z+V1MutatingWebhook.admission_review_versionsu   s-     ((??D]De`aa*C'r2   c                     | j                   S )zGets the client_config of this V1MutatingWebhook.  # noqa: E501


        :return: The client_config of this V1MutatingWebhook.  # noqa: E501
        :rtype: AdmissionregistrationV1WebhookClientConfig
        )r#   r4   s    r0   r   zV1MutatingWebhook.client_config   s     """r2   c                 X    | j                   j                  r|t        d      || _        y)zSets the client_config of this V1MutatingWebhook.


        :param client_config: The client_config of this V1MutatingWebhook.  # noqa: E501
        :type: AdmissionregistrationV1WebhookClientConfig
        Nz5Invalid value for `client_config`, must not be `None`)r!   r6   r7   r#   )r/   r   s     r0   r   zV1MutatingWebhook.client_config   s,     ((??MDYTUU+r2   c                     | j                   S )aO  Gets the failure_policy of this V1MutatingWebhook.  # noqa: E501

        FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.  # noqa: E501

        :return: The failure_policy of this V1MutatingWebhook.  # noqa: E501
        :rtype: str
        r$   r4   s    r0   r   z V1MutatingWebhook.failure_policy   s     ###r2   c                     || _         y)aN  Sets the failure_policy of this V1MutatingWebhook.

        FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.  # noqa: E501

        :param failure_policy: The failure_policy of this V1MutatingWebhook.  # noqa: E501
        :type: str
        Nr;   )r/   r   s     r0   r   z V1MutatingWebhook.failure_policy   s      .r2   c                     | j                   S )a  Gets the match_conditions of this V1MutatingWebhook.  # noqa: E501

        MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.   2. If ALL matchConditions evaluate to TRUE, the webhook is called.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy=Fail, reject the request      - If failurePolicy=Ignore, the error is ignored and the webhook is skipped  # noqa: E501

        :return: The match_conditions of this V1MutatingWebhook.  # noqa: E501
        :rtype: list[V1MatchCondition]
        r%   r4   s    r0   r   z"V1MutatingWebhook.match_conditions   s     %%%r2   c                     || _         y)a  Sets the match_conditions of this V1MutatingWebhook.

        MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.  The exact matching logic is (in order):   1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.   2. If ALL matchConditions evaluate to TRUE, the webhook is called.   3. If any matchCondition evaluates to an error (but none are FALSE):      - If failurePolicy=Fail, reject the request      - If failurePolicy=Ignore, the error is ignored and the webhook is skipped  # noqa: E501

        :param match_conditions: The match_conditions of this V1MutatingWebhook.  # noqa: E501
        :type: list[V1MatchCondition]
        Nr>   )r/   r   s     r0   r   z"V1MutatingWebhook.match_conditions   s     "2r2   c                     | j                   S )a=  Gets the match_policy of this V1MutatingWebhook.  # noqa: E501

        matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.  Defaults to "Equivalent"  # noqa: E501

        :return: The match_policy of this V1MutatingWebhook.  # noqa: E501
        :rtype: str
        r&   r4   s    r0   r   zV1MutatingWebhook.match_policy        !!!r2   c                     || _         y)a:  Sets the match_policy of this V1MutatingWebhook.

        matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".  - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.  - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.  Defaults to "Equivalent"  # noqa: E501

        :param match_policy: The match_policy of this V1MutatingWebhook.  # noqa: E501
        :type: str
        NrA   )r/   r   s     r0   r   zV1MutatingWebhook.match_policy   s     *r2   c                     | j                   S )a  Gets the name of this V1MutatingWebhook.  # noqa: E501

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

        :return: The name of this V1MutatingWebhook.  # noqa: E501
        :rtype: str
        )r'   r4   s    r0   r   zV1MutatingWebhook.name   s     zzr2   c                 X    | j                   j                  r|t        d      || _        y)at  Sets the name of this V1MutatingWebhook.

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

        :param name: The name of this V1MutatingWebhook.  # noqa: E501
        :type: str
        Nz,Invalid value for `name`, must not be `None`)r!   r6   r7   r'   )r/   r   s     r0   r   zV1MutatingWebhook.name   s*     ((??DLKLL
r2   c                     | j                   S )zGets the namespace_selector of this V1MutatingWebhook.  # noqa: E501


        :return: The namespace_selector of this V1MutatingWebhook.  # noqa: E501
        :rtype: V1LabelSelector
        r(   r4   s    r0   r   z$V1MutatingWebhook.namespace_selector   s     '''r2   c                     || _         y)zSets the namespace_selector of this V1MutatingWebhook.


        :param namespace_selector: The namespace_selector of this V1MutatingWebhook.  # noqa: E501
        :type: V1LabelSelector
        NrG   )r/   r   s     r0   r   z$V1MutatingWebhook.namespace_selector  s     $6 r2   c                     | j                   S )zGets the object_selector of this V1MutatingWebhook.  # noqa: E501


        :return: The object_selector of this V1MutatingWebhook.  # noqa: E501
        :rtype: V1LabelSelector
        r)   r4   s    r0   r   z!V1MutatingWebhook.object_selector  s     $$$r2   c                     || _         y)zSets the object_selector of this V1MutatingWebhook.


        :param object_selector: The object_selector of this V1MutatingWebhook.  # noqa: E501
        :type: V1LabelSelector
        NrJ   )r/   r   s     r0   r   z!V1MutatingWebhook.object_selector  s     !0r2   c                     | j                   S )a  Gets the reinvocation_policy of this V1MutatingWebhook.  # noqa: E501

        reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".  Never: the webhook will not be called more than once in a single admission evaluation.  IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.  Defaults to "Never".  # noqa: E501

        :return: The reinvocation_policy of this V1MutatingWebhook.  # noqa: E501
        :rtype: str
        r*   r4   s    r0   r   z%V1MutatingWebhook.reinvocation_policy"  s     (((r2   c                     || _         y)a  Sets the reinvocation_policy of this V1MutatingWebhook.

        reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".  Never: the webhook will not be called more than once in a single admission evaluation.  IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.  Defaults to "Never".  # noqa: E501

        :param reinvocation_policy: The reinvocation_policy of this V1MutatingWebhook.  # noqa: E501
        :type: str
        NrM   )r/   r   s     r0   r   z%V1MutatingWebhook.reinvocation_policy-  s     %8!r2   c                     | j                   S )a  Gets the rules of this V1MutatingWebhook.  # noqa: E501

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

        :return: The rules of this V1MutatingWebhook.  # noqa: E501
        :rtype: list[V1RuleWithOperations]
        r+   r4   s    r0   r   zV1MutatingWebhook.rules9  s     {{r2   c                     || _         y)a  Sets the rules of this V1MutatingWebhook.

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

        :param rules: The rules of this V1MutatingWebhook.  # noqa: E501
        :type: list[V1RuleWithOperations]
        NrP   )r/   r   s     r0   r   zV1MutatingWebhook.rulesD  s     r2   c                     | j                   S )a  Gets the side_effects of this V1MutatingWebhook.  # noqa: E501

        SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain 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.  # noqa: E501

        :return: The side_effects of this V1MutatingWebhook.  # noqa: E501
        :rtype: str
        )r,   r4   s    r0   r   zV1MutatingWebhook.side_effectsP  rB   r2   c                 X    | j                   j                  r|t        d      || _        y)a  Sets the side_effects of this V1MutatingWebhook.

        SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain 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.  # noqa: E501

        :param side_effects: The side_effects of this V1MutatingWebhook.  # noqa: E501
        :type: str
        Nz4Invalid value for `side_effects`, must not be `None`)r!   r6   r7   r,   )r/   r   s     r0   r   zV1MutatingWebhook.side_effects[  s,     ((??LDXSTT)r2   c                     | j                   S )a  Gets the timeout_seconds of this V1MutatingWebhook.  # noqa: E501

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

        :return: The timeout_seconds of this V1MutatingWebhook.  # noqa: E501
        :rtype: int
        r-   r4   s    r0   r   z!V1MutatingWebhook.timeout_secondsi  s     $$$r2   c                     || _         y)a  Sets the timeout_seconds of this V1MutatingWebhook.

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

        :param timeout_seconds: The timeout_seconds of this V1MutatingWebhook.  # noqa: E501
        :type: int
        NrU   )r/   r   s     r0   r   z!V1MutatingWebhook.timeout_secondst  s     !0r2   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hasattrrY   )xs    r0   <lambda>z+V1MutatingWebhook.to_dict.<locals>.<lambda>  s    WQ	-BaiikIIr2   rY   c                 T    t        | d   d      r| d   | d   j                         fS | S )N   rY   r   rZ   )items    r0   r]   z+V1MutatingWebhook.to_dict.<locals>.<lambda>  s6    tAw	2 #'q'47??+<!= "=8<"=r2   )six	iteritemsopenapi_typesgetattr
isinstancelistmapr[   rY   dictitems)r/   resultattr_values        r0   rY   zV1MutatingWebhook.to_dict  s    }}T%7%78GD!D$'E%&#CI%  t 	*$}}tE4(#C=KKM%  t  %t! 9$ r2   c                 H    t        j                  | j                               S )z.Returns the string representation of the model)pprintpformatrY   r4   s    r0   to_strzV1MutatingWebhook.to_str  s    ~~dlln--r2   c                 "    | j                         S )zFor `print` and `pprint`)rq   r4   s    r0   __repr__zV1MutatingWebhook.__repr__  s    {{}r2   c                 f    t        |t              sy| j                         |j                         k(  S )z&Returns true if both objects are equalFre   r   rY   r/   others     r0   __eq__zV1MutatingWebhook.__eq__  s'    %!23||~00r2   c                 f    t        |t              sy| j                         |j                         k7  S )z*Returns true if both objects are not equalTru   rv   s     r0   __ne__zV1MutatingWebhook.__ne__  s'    %!23||~00r2   )NNNNNNNNNNNNN)__name__
__module____qualname____doc__rc   attribute_mapr1   propertyr
   setterr   r   r   r   r   r   r   r   r   r   r   rY   rq   rs   rx   rz    r2   r0   r   r      s    &1E4/,$- M  &?')-%1+3%+M'3R / / %%D &D # # 
, 
, $ $ 	. 	. & & 	2 	2 " " 	* 	*   
[[  ( ( 6 6 % % 0 0 ) ) 	8  	8   \\	 	 " " * * % % 	0 	00.11r2   r   )r~   ro   rera   kubernetes.client.configurationr   objectr   r   r2   r0   <module>r      s&     	 
 9W1 W1r2   