
    :g4                     f    d Z ddlmZ ddlZddlZddl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
    )absolute_importN)http_clientc                      e Zd ZdZdZ	 	 	 	 ddZd Zed        Ze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ddZy)Configurationa  NOTE: This class is auto generated by OpenAPI Generator

    Ref: https://openapi-generator.tech
    Do not edit the class manually.

    :param host: Base url
    :param api_key: Dict to store API key(s).
      Each entry in the dict specifies an API key.
      The dict key is the name of the security scheme in the OAS specification.
      The dict value is the API key secret.
    :param api_key_prefix: Dict to store API prefix (e.g. Bearer)
      The dict key is the name of the security scheme in the OAS specification.
      The dict value is an API key prefix when generating the auth data.
    :param username: Username for HTTP basic authentication
    :param password: Password for HTTP basic authentication
    :param discard_unknown_keys: Boolean value indicating whether to discard
      unknown properties. A server may send a response that includes additional
      properties that are not known by the client in the following scenarios:
      1. The OpenAPI document is incomplete, i.e. it does not match the server
         implementation.
      2. The client was generated using an older version of the OpenAPI document
         and the server has been upgraded since then.
      If a schema in the OpenAPI document defines the additionalProperties attribute,
      then all undeclared properties received by the server are injected into the
      additional properties map. In that case, there are undeclared properties, and
      nothing to discard.

    :Example:

    API Key Authentication Example.
    Given the following security scheme in the OpenAPI specification:
      components:
        securitySchemes:
          cookieAuth:         # name for the security scheme
            type: apiKey
            in: cookie
            name: JSESSIONID  # cookie name

    You can programmatically set the cookie:
      conf = client.Configuration(
        api_key={'cookieAuth': 'abc123'}
        api_key_prefix={'cookieAuth': 'JSESSIONID'}
      )
    The following cookie will be added to the HTTP request:
       Cookie: JSESSIONID abc123
    Nc                    || _         	 d| _        	 i | _        |r|| _        	 i | _        |r|| _        	 d| _        	 || _        	 || _        	 || _        i | _        	 t        j                  d      | j                  d<   t        j                  d      | j                  d<   d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 t-        j.                         d	z  | _        	 d| _        	 d| _        	 d| _        	 d
| _        	 d| _        	 d| _        y)zConstructor
        Nclientpackage_loggerurllib3urllib3_loggerz%%(asctime)s %(levelname)s %(message)sFT    )hosttemp_folder_pathapi_keyapi_key_prefixrefresh_api_key_hookusernamepassworddiscard_unknown_keysloggerlogging	getLoggerlogger_formatlogger_stream_handlerlogger_file_handlerlogger_filedebug
verify_sslssl_ca_cert	cert_filekey_fileassert_hostnametls_server_namemultiprocessing	cpu_countconnection_pool_maxsizeproxyno_proxyproxy_headerssafe_chars_for_path_paramretriesclient_side_validation)selfr   r   r   r   r   r   s          T/var/www/openai/venv/lib/python3.12/site-packages/kubernetes/client/configuration.py__init__zConfiguration.__init__K   s    		 $	 "DL	 "0D	$(!	 	 	$8!	(/(9(9((C$%(/(9(9)(D$%D	%)"	#' 		
	 	  			#	#	 (7'@'@'BQ'F$	 
		!	)+&		 '+#    c           	      x   | j                   }|j                  |      }||t        |       <   | j                  j	                         D ]+  \  }}|dvst        ||t        j                  ||             - t        j                  | j                        |_        | j                  |_	        | j                  |_
        |S )N)r   r   )	__class____new__id__dict__itemssetattrcopydeepcopyr   r   r   )r-   memoclsresultkvs         r.   __deepcopy__zConfiguration.__deepcopy__   s    nnS!RXMM'')DAq994==D#9: * 		$++.!--zzr0   c                 8    t        j                  |      | _        y)zSet default instance of configuration.

        It stores default configuration, which can be
        returned by get_default_copy method.

        :param default: object of Configuration
        N)r8   r9   _default)r;   defaults     r.   set_defaultzConfiguration.set_default   s     }}W-r0   c                 l    | j                   t        j                  | j                         S t               S )a  Return new instance of configuration.

        This method returns newly created, based on default constructor,
        object of Configuration class or returns a copy of default
        configuration passed by the set_default method.

        :return: The configuration object.
        )rA   r8   r9   r   )r;   s    r.   get_default_copyzConfiguration.get_default_copy   s)     <<#==..r0   c                     | j                   S )The logger file.

        If the logger_file is None, then add stream handler and remove file
        handler. Otherwise, add file handler and remove stream handler.

        :param value: The logger_file path.
        :type: str
        )_Configuration__logger_filer-   s    r.   r   zConfiguration.logger_file   s     !!!r0   c                 B   || _         | j                   rt        j                  | j                         | _        | j                  j	                  | j
                         t        j                  | j                        D ]   \  }}|j                  | j                         " yy)rG   N)
rH   r   FileHandlerr   setFormatterlogger_formattersix	iteritemsr   
addHandlerr-   value_r   s       r.   r   zConfiguration.logger_file   s~     # (/':':4;M;M'ND$$$11$2G2GH ]]4;;7	6!!$":":; 8 r0   c                     | j                   S )aDebug status

        :param value: The debug status, True or False.
        :type: bool
        )_Configuration__debugrI   s    r.   r   zConfiguration.debug   s     ||r0   c                    || _         | j                   r\t        j                  | j                        D ]$  \  }}|j	                  t
        j                         & dt        j                  _	        yt        j                  | j                        D ]$  \  }}|j	                  t
        j                         & dt        j                  _	        y)rU      r   N)rV   rN   rO   r   setLevelr   DEBUGhttplibHTTPConnection
debuglevelWARNINGrQ   s       r.   r   zConfiguration.debug  s     << ]]4;;7	6. 8 12G""- !]]4;;7	60 8 12G""-r0   c                     | j                   S )The logger format.

        The logger_formatter will be updated when sets logger_format.

        :param value: The format string.
        :type: str
        )_Configuration__logger_formatrI   s    r.   r   zConfiguration.logger_format  s     ###r0   c                 Z    || _         t        j                  | j                         | _        y)r`   N)ra   r   	FormatterrM   )r-   rR   s     r.   r   zConfiguration.logger_format"  s%      % ' 1 1$2F2F Gr0   c                     | j                   | j                  |        | j                  j                  |      }|r&| j                  j                  |      }|r|d|S |S y)zGets API key (with prefix if set).

        :param identifier: The identifier of apiKey.
        :return: The token for api key authentication.
        N )r   r   getr   )r-   
identifierkeyprefixs       r.   get_api_key_with_prefixz%Configuration.get_api_key_with_prefix.  sc     $$0%%d+llz*((,,Z8F"(#..
 r0   c                     d}| j                   | j                   }d}| j                  | j                  }t        j                  j	                  |dz   |z         j                  d      S )zsGets HTTP basic authentication header (string).

        :return: The token for basic HTTP authentication.
        r   :)
basic_authauthorization)r   r   r
   utilmake_headersrf   )r-   r   r   s      r.   get_basic_auth_tokenz"Configuration.get_basic_auth_token>  sf    
 ==$}}H==$}}H||((#~0 ) 

#o
	r0   c                 X    i }d| j                   v rddd| j                  d      d|d<   |S )zfGets Auth Settings dict for api client.

        :return: The Auth Settings information dict.
        rn   r   header)typeinrh   rR   BearerToken)r   rj   )r-   auths     r.   auth_settingszConfiguration.auth_settingsM  s?    
 dll*!&55oF	#D r0   c                 `    dj                  t        j                  t        j                        S )zbGets the essential information for debugging.

        :return: The report for debugging.
        z{Python SDK Debug Report:
OS: {env}
Python Version: {pyversion}
Version of the API: release-1.32
SDK Package Version: 32.0.0)env	pyversion)formatsysplatformversionrI   s    r.   to_debug_reportzConfiguration.to_debug_report\  s$    
-
 v#,,#++v>	?r0   c                     dddgS )zSGets an array of host settings

        :return: An array of host settings
        /zNo description provided)urldescription rI   s    r.   get_host_settingszConfiguration.get_host_settingsh  s     8
 	
r0   c           	         |i n|}| j                         }	 ||   }|d   }|d   j                         D ]_  \  }}|j                  ||d         }d|v r)||d   vr"t        dj                  |||   |d               |j                  d|z   dz   |      }a |S # t        $ r% t        dj                  |t	        |                  w xY w)	zGets host URL based on the index and variables
        :param index: array index of the host settings
        :param variables: hash of variable and the corresponding value
        :return: URL based on host settings
        zIInvalid index {0} when selecting the host settings. Must be less than {1}r   	variablesdefault_valueenum_valueszFThe variable `{0}` in the host URL has invalid value {1}. Must be {2}.{})r   
IndexError
ValueErrorr|   lenr6   rf   replace)	r-   indexr   serversserverr   variable_namevariable
used_values	            r.   get_host_from_settingsz$Configuration.get_host_from_settingst  s    $+B	((*	EU^F Um (.k':'@'@'B#M8"x8:J ("(=*AA ((.%y'? /)12 2 ++cM1C7DC (C 
-  	E((.uc'l(CE E	Es   B .C)zhttp://localhostNNNNF)N)__name__
__module____qualname____doc__rA   r/   r?   classmethodrC   rE   propertyr   setterr   r   rj   rq   rx   r   r   r   r   r0   r.   r   r      s    -^ H..2)-&+e+N . .   	" 	" < <$   \\2 2* $ $ 	H 	H 
?

!r0   r   )r   
__future__r   r8   r   r$   r}   r
   rN   	six.movesr   r[   objectr   r   r0   r.   <module>r      s2    '    
  
 ,|F |r0   