
    $jMC              	          d Z ddlZddlmZ ddlZddlmZ ddlZddlm	Z	m
Z
mZmZmZmZmZ ddlmZmZ ddlZh dZeeef         Z edeeeed          Z ed	ed
         ed         ed         ed          Z eded         eeee         d          Z eded         ed         ed         ee         d          Z eded         ed         ed         ed         ed          Z eded         ed         ed         ed          Z eded         ed         ed         dd          Z edi d          Z G d de          Z G d de          Z  G d d           Z!dS )!z
    Hindsight HTTP API

    HTTP API for Hindsight

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

    Do not edit the class manually.
    N)FileHandler)AnyClassVarDictListLiteralOptional	TypedDict)NotRequiredSelf>
   maximumminimumpatternmaxItemsminItems	maxLength	minLength
multipleOfexclusiveMaximumexclusiveMinimumGenericAuthSetting)typeinkeyvalueOAuth2AuthSettingoauth2headerAuthorizationAPIKeyAuthSettingapi_keyBasicAuthSettingbasicBearerFormatAuthSettingbearerJWT)r   r   formatr   r   BearerAuthSettingHTTPSignatureAuthSettingzhttp-signatureAuthSettingsF)totalc                   :    e Zd ZU eed<   eed<   ee         ed<   dS )HostSettingVariabledescriptiondefault_valueenum_valuesN)__name__
__module____qualname__str__annotations__r        j/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/hindsight_client_api/configuration.pyr-   r-   x   s:         cr7   r-   c                   J    e Zd ZU eed<   eed<   eeeef                  ed<   dS )HostSettingurlr.   	variablesN)r1   r2   r3   r4   r5   r   r   r-   r6   r7   r8   r:   r:   ~   sC         	HHH4%8 89::::::r7   r:   c                       e Zd ZU dZdZeee                  ed<   	 	 	 	 	 	 	 	 	 	 	 	 	 d2dddee	         dee
e	e	f                  dee
e	e	f                  d	ee	         d
ee	         dee	         dee         dee         dee
eef                  dee
eef                  dedee	         dee         dee         ddfdZde
eef         defdZde	deddfdZedee         ddfd            Zedefd            Zedefd            Zedee	         fd            Zej        dee	         ddfd             Zedefd!            Zej        deddfd"            Zede	fd#            Zej        de	ddfd$            Zd3d%e	d&ee	         dee	         fd'Zdee	         fd(Zdefd)Zde	fd*Zde e!         fd+Z"	 	 d4d,ee         d-ee         d.ee e!                  de	fd/Z#ede	fd0            Z$e$j        de	ddfd1            Z$dS )5Configurationau  This class contains various settings of the API client.

    :param host: Base url.
    :param ignore_operation_servers
      Boolean to ignore operation servers for the API client.
      Config will use `host` as the base url regardless of the operation servers.
    :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.
    :param retries: Number of retries for API requests.

    N_defaultF)debughostr!   api_key_prefixusernamepasswordaccess_tokenserver_indexserver_variablesserver_operation_indexserver_operation_variablesignore_operation_serversssl_ca_certretriesr@   returnc                   |dn|| _         	 ||dn|| _        |	pi | _        	 |pi | _        |
pi | _        	 || _        	 d| _        	 i | _        |r|| _        	 i | _        |r|| _        	 d| _	        	 || _
        	 || _        	 || _        	 i | _        	 t          j        d          | j        d<   t          j        d          | j        d<   d| _        	 d| _        	 d| _        	 d| _        	 ||| _        nd	| _        	 d
| _        	 || _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 d| _        	 || _         	 d
| _!        d| _"        	 d| _#        	 d| _$        dS )zConstructor
        Nzhttp://localhostr   hindsight_client_apipackage_loggerurllib3urllib3_loggerz%%(asctime)s %(levelname)s %(message)sFTd    z%Y-%m-%dT%H:%M:%S.%f%zz%Y-%m-%d)%
_base_pathrF   rH   rG   rI   rJ   temp_folder_pathr!   rB   refresh_api_key_hookrC   rD   rE   loggerlogging	getLoggerlogger_formatlogger_stream_handlerlogger_file_handlerlogger_filer@   _Configuration__debug
verify_sslrK   	cert_filekey_fileassert_hostnametls_server_nameconnection_pool_maxsizeproxyproxy_headerssafe_chars_for_path_paramrL   client_side_validationsocket_optionsdatetime_formatdate_format)selfrA   r!   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   r@   s                  r8   __init__zConfiguration.__init__   s>   ( 15,,$	!-!5$,AAL&<&B#	 0 6B*D*J'	(@%	 $	  	#"DL	  	1"0D	$(!	 	 	(		(/(9:P(Q(Q$%(/(9)(D(D$%D	%)"	:> 		DJJ DL	 	 '			#	#	 (+$	 %)
	!	)+&		 '+#"	  8	 &	 	r7   memoc           	      \   | j         }|                    |          }||t          |           <   | j                                        D ]-\  }}|dvr$t          ||t          j        ||                     .t          j        | j                  |_        | j	        |_	        | j
        |_
        |S )N)rX   r]   )	__class____new__id__dict__itemssetattrcopydeepcopyrX   r^   r@   )rm   ro   clsresultkvs         r8   __deepcopy__zConfiguration.__deepcopy__1  s    nS!!RXXM'')) 	; 	;DAq9994=D#9#9:::	$+..!-zr7   namer   c                 >    t                               | ||           d S N)object__setattr__)rm   r~   r   s      r8   r   zConfiguration.__setattr__?  s     4u-----r7   defaultc                     || _         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r?   )ry   r   s     r8   set_defaultzConfiguration.set_defaultB  s     r7   c                 *    |                                  S )zDeprecated. Please use `get_default` instead.

        Deprecated. Please use `get_default` instead.

        :return: The configuration object.
        )get_defaultry   s    r8   get_default_copyzConfiguration.get_default_copyM  s        r7   c                 <    | j          |             | _         | 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.
        r   r   s    r8   r   zConfiguration.get_defaultW  s!     <355CL|r7   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rm   s    r8   r^   zConfiguration.logger_filee  s     !!r7   c                    || _         | j         rvt          j        | j                   | _        | j                            | j                   | j                                        D ]!\  }}|                    | j                    dS dS )r   N)	r   rY   r   r]   setFormatterlogger_formatterrX   ru   
addHandlerrm   r   _rX   s       r8   r^   zConfiguration.logger_fileq  s     # 	< (/':4;M'N'ND$$11$2GHHH![..00 < <	6!!$":;;;;	< 	<
< <r7   c                     | j         S )aDebug status

        :param value: The debug status, True or False.
        :type: bool
        )r_   r   s    r8   r@   zConfiguration.debug  s     |r7   c                 b   || _         | j         rQ| j                                        D ]$\  }}|                    t          j                   %dt          j        _        dS | j                                        D ]$\  }}|                    t          j	                   %dt          j        _        dS )r      r   N)
r_   rX   ru   setLevelrY   DEBUGhttplibHTTPConnection
debuglevelWARNINGr   s       r8   r@   zConfiguration.debug  s     < 	2![..00 / /	6....01G"--- "[..00 1 1	6000001G"---r7   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_formatr   s    r8   r[   zConfiguration.logger_format  s     ##r7   c                 P    || _         t          j        | j                   | _        dS )r   N)r   rY   	Formatterr   rm   r   s     r8   r[   zConfiguration.logger_format  s(      % ' 1$2F G Gr7   
identifieraliasc                     | j         |                      |            | j                            ||| j                            |          nd          }|r%| j                            |          }|r|d|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.
        N )rW   r!   getrB   )rm   r   r   r   prefixs        r8   get_api_key_with_prefixz%Configuration.get_api_key_with_prefix  s     $0%%d+++lzeFW4<+;+;E+B+B+B]abb 	(,,Z88F "(&&##..
tr7   c                     d}| j         | j         }d}| j        | j        }t          j                            |dz   |z                                 d          S )zsGets HTTP basic authentication header (string).

        :return: The token for basic HTTP authentication.
        rT   N:)
basic_authauthorization)rC   rD   rQ   utilmake_headersr   )rm   rC   rD   s      r8   get_basic_auth_tokenz"Configuration.get_basic_auth_token  sd    
 =$}H=$}H|((#~0 ) 
 

#o

	r7   c                 
    i }|S )zfGets Auth Settings dict for api client.

        :return: The Auth Settings information dict.
        r6   )rm   auths     r8   auth_settingszConfiguration.auth_settings  s    
  r7   c                 X    d                     t          j        t          j                  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: 0.6.1
SDK Package Version: 0.0.7)env	pyversion)r'   sysplatformversionr   s    r8   to_debug_reportzConfiguration.to_debug_report  s#    
,
 v#,#+v>>	?r7   c                     dddgS )zSGets an array of host settings

        :return: An array of host settings
        rT   zNo description provided)r;   r.   r6   r   s    r8   get_host_settingszConfiguration.get_host_settings  s     8 
 	
r7   indexr<   serversc           	      <   || j         S |i n|}||                                 n|}	 ||         }n># t          $ r1 t          d                    |t          |                              w xY w|d         }|                    di                                           D ]{\  }}|                    ||d                   }d|v r:||d         vr0t          d                    |||         |d                             |                    d|z   d	z   |          }||S )
a  Gets 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
        :param servers: an array of host settings or None
        :return: URL based on host settings
        NzIInvalid index {0} when selecting the host settings. Must be less than {1}r;   r<   r/   r0   zFThe variable `{0}` in the host URL has invalid value {1}. Must be {2}.{})	rU   r   
IndexError
ValueErrorr'   lenr   ru   replace)	rm   r   r<   r   serverr;   variable_namevariable
used_values	            r8   get_host_from_settingsz$Configuration.get_host_from_settings  sm    =?"#+BB	.5o$((***7	EU^FF 	E 	E 	E((.uc'll(C(CE E E	E
 Um (.zz+r'B'B'H'H'J'J 	E 	E#M8"x8: :J (("(=*AAA ((.%y'? /)1 )12 2 2 ++cM1C7DDCC
s	   2 ;A-c                 D    |                      | j        | j                  S )zReturn generated host.)r<   )r   rF   rG   r   s    r8   rA   zConfiguration.host(  s#     **4+<H]*^^^r7   c                 "    || _         d| _        dS )zFix base path.N)rU   rF   r   s     r8   rA   zConfiguration.host-  s       r7   )NNNNNNNNNNFNNr   )NN)%r1   r2   r3   __doc__r?   r   r	   r   r5   r4   r   intServerVariablesTboolrn   r   r}   r   classmethodr   r   r   propertyr^   setterr@   r[   r   r   r*   r   r   r   r:   r   r   rA   r6   r7   r8   r>   r>      s         @ *.Hhx~&--- !*.15 $ $$($(599=JN',#'!%H  !%!H H HsmH $sCx.)H !c3h0	H
 3-H 3-H smH smH ##34H !)c3h 8H %-T#7G2G-H$IH #'H c]H #H  ~!H" 
#H H H HT$sCx. T    . .C .D . . . . (4. T    [ ! ! ! ! [! D    [ 	"Xc] 	" 	" 	" X	" <# <4 < < < <$ t    X \24 2D 2 2 2 \2* $s $ $ $ X$ 	H3 	H4 	H 	H 	H 	H # hsm U]^aUb    &hsm    l    
? 
? 
? 
? 
?

4#4 

 

 

 

 /3-1	* *}* ,-* ${+,	*
 
* * * *X _c _ _ _ X_ 
[!# !$ ! ! ! [! ! !r7   r>   )"r   rw   http.clientclientr   rY   r   r   typingr   r   r   r   r   r	   r
   typing_extensionsr   r   rQ   JSON_SCHEMA_VALIDATION_KEYWORDSr4   r   r   r   r    r"   r$   r(   r)   r*   r-   r:   r>   r6   r7   r8   <module>r      s  	 	               



 J J J J J J J J J J J J J J J J J J / / / / / / / / # # #  S> Y	    I!h'	    I	"#	    9 h'#	    $)!h%.' 	 	  I!h'	    %9()h'	    y
	      )   ; ; ; ; ;) ; ; ;m! m! m! m! m! m! m! m! m! m!r7   