
    i                     B    d dl mZ d dlmZ d dlmZmZ  G d de      Zy)   )	none_type)
HeaderUtil)EndpointUtilsExtraOpenApiKwargsTypedDictc                   @    e Zd Z	 	 	 	 	 	 d	 d	dZd Zd ZdedefdZy)
AsyncioEndpointNreturnc                    || _         || _        | j                  d   j                  g d       | j                  d   j                  dg       |d   | _        |d   | _        |d   | _        t        ft        t        t        ft        gt        t        ft        gft        ft        ft        fd}| j
                  j                  |       |d   | _        |d	   | _        |d
   | _        || _        || _        || _        y)a\  Creates an endpoint

        Args:
            settings (dict): see below key value pairs
                'response_type' (tuple/None): response type
                'auth' (list): a list of auth type keys
                'endpoint_path' (str): the endpoint path
                'operation_id' (str): endpoint string identifier
                'http_method' (str): POST/PUT/PATCH/GET etc
                'servers' (list): list of str servers that this endpoint is at
            params_map (dict): see below key value pairs
                'all' (list): list of str endpoint parameter names
                'required' (list): list of required parameter names
                'nullable' (list): list of nullable parameter names
                'enum' (list): list of parameters with enum values
                'validation' (list): list of parameters with validations
            root_map
                'validations' (dict): the dict mapping endpoint parameter tuple
                    paths to their validation dictionaries
                'allowed_values' (dict): the dict mapping endpoint parameter
                    tuple paths to their allowed_values (enum) dictionaries
                'openapi_types' (dict): param_name to openapi type
                'attribute_map' (dict): param_name to camelCase name
                'location_map' (dict): param_name to  'body', 'file', 'form',
                    'header', 'path', 'query'
                collection_format_map (dict): param_name to `csv` etc.
            headers_map (dict): see below key value pairs
                'accept' (list): list of Accept header strings
                'content_type' (list): list of Content-Type header strings
            api_client (AsyncioApiClient) api client instance
            callable (function): the function which is invoked when the
                Endpoint is called
        all)_preload_content_request_timeout_return_http_data_only_check_input_type_check_return_typenullabler   validationsallowed_valuesopenapi_typesattribute_maplocation_mapcollection_format_mapN)settings
params_mapextendr   r   r   boolr   floatintupdater   r   r   headers_map
api_clientcallable)selfr   r   root_mapr   r    r!   extra_typess           {/var/www/catia.catastroantioquia-mas.com/valormas/lib/python3.12/site-packages/pinecone/openapi_support/asyncio_endpoint.py__init__zAsyncioEndpoint.__init__   s    T !$%%	
 	
#**,>+?@#M2&'78%o6!%!*EE8eWcC6TWSX Y'+g"&#''
 	!!+.%o6$^4%-.E%F"&$     c                 J   K    | j                   | g|i | d{   S 7 w)a  This method is invoked when endpoints are called
        Example:

        api_instance = InferenceApi()
        api_instance.embed  # this is an instance of the class Endpoint
        api_instance.embed()  # this invokes api_instance.embed.__call__()
        which then invokes the callable functions stored in that endpoint at
        api_instance.embed.callable or self.callable in this class

        N)r!   )r"   argskwargss      r%   __call__zAsyncioEndpoint.__call__O   s)      #T]]49$9&9999s   #!#c                   K   | j                   j                  j                  }t        j                  | j
                  | j                  |       t        j                  | j
                  | j                  |       t        j                  | j                   j                  | j
                  | j                  | j                  | j                  |       t        j                  | j                  | j                  | j                  | j                  |      }t!        j"                  | j$                  |       | j                   j'                  | j                  d   | j                  d   |d   |d   |d	   |d
   |d   |d   | j                  d   | j                  d   |d   |d   |d   |d   ||d          d {   S 7 w)N)r   r   r*   )configr   r   r   r   r*   )r   r   r   r   r*   )r   paramsendpoint_pathhttp_methodpathqueryheaderbodyformfileresponse_typeauthr   r   r   r   collection_format)r4   post_paramsfilesr7   auth_settings_check_typer   r   r   _hostcollection_formats)r    configurationhostr   raise_if_unexpected_paramr   r    raise_if_missing_required_paramsraise_if_invalid_inputsr   r   r   gather_paramsr   r   r   r   prepare_headersr   call_api)r"   r*   r>   r.   s       r%   call_with_http_infoz#AsyncioEndpoint.call_with_http_info\   s    --22//v	
 	66v	
 	--??00..((,,	
 ,,,,**,,"&"<"<
 	""t/?/?O__--MM/*MM-(6N7O8v.--8--/34#)*B#C#$67#$67%&9:! . 
 
 	
 
s   F6F?8F=9F?r*   c                     |j                  dd      |d<   |j                  dd      |d<   |j                  dd       |d<   |j                  dd      |d<   |j                  dd      |d<   |S )Nr   Tr   r   r   r   )get)r"   r*   s     r%   _process_openapi_kwargsz'AsyncioEndpoint._process_openapi_kwargs   s}     ,2::6NPT+U'(%+ZZ0BD%I!"%+ZZ0BD%I!"&,jj1Dd&K"#'-zz2F'M#$r'   )NNNNNN)r	   N)__name__
__module____qualname__r&   r+   rH   r   rK    r'   r%   r   r      sH     F! 
F!P:/
b1	$r'   r   N)	model_utilsr   api_client_utilsr   endpoint_utilsr   r   objectr   rO   r'   r%   <module>rT      s    " ( FOf Or'   