o
    ?Hh0                     @   sl   d 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 ddl	m
Z
 ddlmZ h dZG dd deZdS )z
    LINE Messaging API

    This document describes LINE Messaging API.  # noqa: E501

    The version of the OpenAPI document: 0.0.1
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
    N)ApiValueError)__version__>
   maximumminimumpatternmaxItemsminItems	maxLength	minLength
multipleOfexclusiveMaximumexclusiveMinimumc                   @   s   e Zd ZdZdZ							d"ddZdd Zdd Zed	d
 Z	edd Z
edd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zd#ddZdd Zdd Zdd Zed d! ZdS )$Configurationa  This class contains various settings of the API client.

    :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 access_token: Access token.
    :param server_index: Index to servers configuration.
    :param server_variables: Mapping with string values to replace variables in
      templated server configuration. The validation of enums is performed for
      variables with defined enum values before.
    :param server_operation_index: Mapping from operation ID to an index to server
      configuration.
    :param server_operation_variables: Mapping from operation ID to a mapping with
      string values to replace variables in templated server configuration.
      The validation of enums is performed for variables with defined enum values before.
    :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
      in PEM format.

    :Example:
    Nc                 C   sX  || _ 	 |du r|du rdn|| _|	pi | _	 |pi | _|
pi | _	 d| _	 i | _|r.|| _	 i | _|r7|| _	 d| _	 || _		 || _
	 || _	 i | _	 td| jd< td| jd< d| _	 d| _	 d| _	 d| _	 d| _	 d	| _	 || _	 d| _	 d| _	 d| _	 t d
 | _	 d| _	 d| _	 d| _	 d| _	 d	| _ d| _!	 d| _"	 d| _#dS )zConstructor
        Nr   zlinebot.v3.modulepackage_loggerurllib3urllib3_loggerz%%(asctime)s %(levelname)s %(message)sFT    z%Y-%m-%dT%H:%M:%S.%f%zz%Y-%m-%d)$
_base_pathserver_indexserver_operation_indexserver_variablesserver_operation_variablestemp_folder_pathapi_keyapi_key_prefixrefresh_api_key_hookusernamepasswordaccess_token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multiprocessing	cpu_countconnection_pool_maxsizeproxyproxy_headerssafe_chars_for_path_paramretriesclient_side_validationsocket_optionsdatetime_formatdate_format)selfhostr   r   r   r   r   r   r   r   r   r)    r:   _/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/linebot/v3/module/configuration.py__init__>   s   



zConfiguration.__init__c                 C   sn   | j }||}||t| < | j D ]\}}|dvr%t||t|| qt| j|_| j	|_	| j
|_
|S )N)r    r%   )	__class____new__id__dict__itemssetattrcopydeepcopyr    r&   r'   )r8   memoclsresultkvr:   r:   r;   __deepcopy__   s   
zConfiguration.__deepcopy__c                 C   s   t | || d S N)object__setattr__)r8   namevaluer:   r:   r;   rM      s   zConfiguration.__setattr__c                 C   s
   || _ dS )zSet default instance of configuration.

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

        :param default: object of Configuration
        N)_default)rF   defaultr:   r:   r;   set_default   s   
	zConfiguration.set_defaultc                 C   s   |   S )zDeprecated. Please use `get_default` instead.

        Deprecated. Please use `get_default` instead.

        :return: The configuration object.
        )get_defaultrF   r:   r:   r;   get_default_copy   s   zConfiguration.get_default_copyc                 C   s   | j du r	t | _ | j S )zReturn the default configuration.

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

        :return: The configuration object.
        N)rP   r   rT   r:   r:   r;   rS      s   

zConfiguration.get_defaultc                 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r8   r:   r:   r;   r&      s   
zConfiguration.logger_filec                 C   sP   || _ | j r$t| j | _| j| j | j D ]\}}|| j qdS dS )rW   N)	rX   r!   FileHandlerr%   setFormatterlogger_formatterr    rA   
addHandlerr8   rO   _r    r:   r:   r;   r&      s   
c                 C   rV   )aDebug status

        :param value: The debug status, True or False.
        :type: bool
        )_Configuration__debugrY   r:   r:   r;   r'   
  s   zConfiguration.debugc                 C   sd   || _ | j r| j D ]
\}}|tj qdtj_dS | j D ]
\}}|tj	 q!dtj_dS )r`      r   N)
ra   r    rA   setLevelr!   DEBUGhttplibHTTPConnection
debuglevelWARNINGr^   r:   r:   r;   r'     s   c                 C   rV   )The logger format.

        The logger_formatter will be updated when sets logger_format.

        :param value: The format string.
        :type: str
        )_Configuration__logger_formatrY   r:   r:   r;   r#   )  s   	zConfiguration.logger_formatc                 C   s   || _ t| j | _dS )ri   N)rj   r!   	Formatterr\   )r8   rO   r:   r:   r;   r#   4  s   	c                 C   s^   | j dur
|  |  | j||dur| j|nd}|r-| j|}|r+d||f S |S dS )zGets API key (with prefix if set).

        :param identifier: The identifier of apiKey.
        :param alias: The alternative identifier of apiKey.
        :return: The token for api key authentication.
        Nz%s %s)r   r   getr   )r8   
identifieraliaskeyprefixr:   r:   r;   get_api_key_with_prefix@  s   

"z%Configuration.get_api_key_with_prefixc                 C   sD   d}| j dur
| j }d}| jdur| j}tjj|d | ddS )zsGets HTTP basic authentication header (string).

        :return: The token for basic HTTP authentication.
        r   N:)
basic_authauthorization)r   r   r   utilmake_headersrl   )r8   r   r   r:   r:   r;   get_basic_auth_tokenQ  s   


z"Configuration.get_basic_auth_tokenc                 C   s*   i }| j durdddd| j  d|d< |S )zfGets Auth Settings dict for api client.

        :return: The Auth Settings information dict.
        NbearerheaderAuthorizationzBearer )typeinro   rO   Bearer)r   )r8   authr:   r:   r;   auth_settings`  s   

zConfiguration.auth_settingsc                 C   s   dj tjtjtd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: 0.0.1
SDK Package Version: {__version__})env	pyversionpackage_version)formatsysplatformversionr   rY   r:   r:   r;   to_debug_reporto  s   zConfiguration.to_debug_reportc                 C   rV   )zReturn generated host.)r   rY   r:   r:   r;   r9   {  s   zConfiguration.host)NNNNNNNNNNNrK   )__name__
__module____qualname____doc__rP   r<   rJ   rM   classmethodrR   rU   rS   propertyr&   setterr'   r#   rq   rw   r   r   r9   r:   r:   r:   r;   r      sJ    
y


	








r   )r   rC   r!   r-   r   r   http.clientclientre   linebot.v3.module.exceptionsr   linebot.__about__r   JSON_SCHEMA_VALIDATION_KEYWORDSrL   r   r:   r:   r:   r;   <module>   s   