o
    ´Å^´#  ã                   @   s`   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„ deƒZdS )aø  
    SendinBlue API

    SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to :   - Manage your campaigns and get the statistics   - Manage your contacts   - Send transactional Emails and SMS   - and much more...  You can download our wrappers at https://github.com/orgs/sendinblue  **Possible responses**   | Code | Message |   | :-------------: | ------------- |   | 200  | OK. Successful Request  |   | 201  | OK. Successful Creation |   | 202  | OK. Request accepted |   | 204  | OK. Successful Update/Deletion  |   | 400  | Error. Bad Request  |   | 401  | Error. Authentication Needed  |   | 402  | Error. Not enough credit, plan upgrade needed  |   | 403  | Error. Permission denied  |   | 404  | Error. Object does not exist |   | 405  | Error. Method not allowed  |   | 406  | Error. Not Acceptable  |   # noqa: E501

    OpenAPI spec version: 3.0.0
    Contact: contact@sendinblue.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
é    )Úabsolute_importN)Úhttp_clientc                   @   s–   e Zd ZdZdZ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„ Zdd„ Zdd„ Zdd„ ZdS )ÚConfigurationz«NOTE: This class is auto generated by the swagger code generator program.

    Ref: https://github.com/swagger-api/swagger-codegen
    Do not edit the class manually.
    Nc                 C   sÞ   | j r| j j ¡ D ]}t | j j| ¡| j|< q	dS d| _d| _i | _i | _d| _d| _	d| _
i | _t d¡| jd< t d¡| jd< d| _d| _d| _d| _d	| _d
| _d| _d| _d| _d| _t ¡ d | _d| _d| _dS )ÚConstructorNzhttps://api.sendinblue.com/v3Ú Úsib_api_v3_sdkÚpackage_loggerÚurllib3Úurllib3_loggerz%%(asctime)s %(levelname)s %(message)sFTé   )Ú_defaultÚ__dict__ÚkeysÚcopyÚhostÚtemp_folder_pathÚapi_keyÚapi_key_prefixÚrefresh_api_key_hookÚusernameÚpasswordÚ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Úsafe_chars_for_path_param)ÚselfÚkey© r+   úN/var/www/html/env/lib/python3.10/site-packages/sib_api_v3_sdk/configuration.pyÚ__init__#   s6   
zConfiguration.__init__c                 C   s
   || _ d S )N)r   )ÚclsÚdefaultr+   r+   r,   Úset_defaultc   s   
zConfiguration.set_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©r)   r+   r+   r,   r   g   s   
zConfiguration.logger_filec                 C   s°   || _ | j r0t | j ¡| _| j | j¡ t | j¡D ]\}}| 	| j¡ | j
r-| | j
¡ qdS t ¡ | _
| j
 | j¡ t | j¡D ]\}}| 	| j
¡ | jrU| | j¡ qBdS )r2   N)r3   r   ÚFileHandlerr   ÚsetFormatterÚlogger_formatterÚsixÚ	iteritemsr   Ú
addHandlerr   ÚremoveHandlerÚStreamHandler©r)   ÚvalueÚ_r   r+   r+   r,   r   s   s$   
€ý
€ýc                 C   r1   )úaDebug status

        :param value: The debug status, True or False.
        :type: bool
        )Ú_Configuration__debugr4   r+   r+   r,   r   ‘   s   zConfiguration.debugc                 C   sh   || _ | j rt | j¡D ]
\}}| tj¡ qdtj_	dS t | j¡D ]
\}}| tj
¡ q#dtj_	dS )r@   é   r   N)rA   r8   r9   r   ÚsetLevelr   ÚDEBUGÚhttplibÚHTTPConnectionÚ
debuglevelÚWARNINGr=   r+   r+   r,   r   š   s   c                 C   r1   )úŸThe logger format.

        The logger_formatter will be updated when sets logger_format.

        :param value: The format string.
        :type: str
        )Ú_Configuration__logger_formatr4   r+   r+   r,   r   °   s   	zConfiguration.logger_formatc                 C   s   || _ t | j ¡| _dS )rI   N)rJ   r   Ú	Formatterr7   )r)   r>   r+   r+   r,   r   »   s   	c                 C   sD   | j r|   | ¡ | j |¡}|r | j |¡}|rd||f S |S dS )z˜Gets API key (with prefix if set).

        :param identifier: The identifier of apiKey.
        :return: The token for api key authentication.
        z%s %sN)r   r   Úgetr   )r)   Ú
identifierr*   Úprefixr+   r+   r,   Úget_api_key_with_prefixÇ   s   
ûz%Configuration.get_api_key_with_prefixc                 C   s    t jj| jd | j d� d¡S )zsGets HTTP basic authentication header (string).

        :return: The token for basic HTTP authentication.
        ú:)Ú
basic_authÚauthorization)r	   ÚutilÚmake_headersr   r   rL   r4   r+   r+   r,   Úget_basic_auth_tokenÙ   s
   ÿþz"Configuration.get_basic_auth_tokenc                 C   s*   ddd|   d¡dœddd|   d¡dœdœS )zfGets Auth Settings dict for api client.

        :return: The Auth Settings information dict.
        r   Úheaderúapi-key)ÚtypeÚinr*   r>   úpartner-key)rW   rZ   )rO   r4   r+   r+   r,   Úauth_settingsâ   s   üü÷zConfiguration.auth_settingsc                 C   s   dj tjtjd�S )zbGets the essential information for debugging.

        :return: The report for debugging.
        zsPython SDK Debug Report:
OS: {env}
Python Version: {pyversion}
Version of the API: 3.0.0
SDK Package Version: 1.0.0)ÚenvÚ	pyversion)ÚformatÚsysÚplatformÚversionr4   r+   r+   r,   Úto_debug_reportù   s   
ûzConfiguration.to_debug_report)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r-   Úclassmethodr0   Úpropertyr   Úsetterr   r   rO   rU   r[   rb   r+   r+   r+   r,   r      s,    @







	r   )rf   Ú
__future__r   r   r   r$   r_   r	   r8   Ú	six.movesr   rE   Úobjectr   r+   r+   r+   r,   Ú<module>   s   