
    Oj$                    4   S r SSKJrJrJrJr  SSKJrJrJ	r	  SSK
JrJr  SSKJrJrJrJr  SSKJrJr  SSKJrJr  SSKJr  S	S
KrS	SKJrJrJrJrJrJrJ r J!r!   " S S\5      r" " S S5      r# " S S5      r$ " S S\5      r% " S S5      r& " S S5      r'g
)zACode generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.   )errorsmodelstypesutils)AfterParseErrorContextHookContextResponseContext)AsyncBaseSDKBaseSDK)	BaseModelOptionalNullableUNSETinteractions)get_security_from_envresponse_helpers)AsyncStreamStream)unmarshal_json_response    N)AnyListLiteralMappingOptionalUnioncastoverloadc            /          \ rS rSr\S 5       r\S 5       r\SSSSS.S\\	R                  \	R                  4   S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\\R(                  \\R,                     4   4S jj5       r\SSSSSSSSSSSSSSSSSSSS.S\\   S\R0                  S\\S   S4   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\R@                  S\RB                  S\RD                  S\S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\R(                  4,S! jj5       r\SSSSSSSSSSSSSSSSSSS".S\\   S\R0                  S\S#   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\R@                  S\RB                  S\RD                  S\S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\\R,                     4,S$ jj5       r\SSSSSSSSSSSSSSSSSSS%.S\\   S&\RH                  S\\S   S4   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\RJ                  S\RL                  S'\RN                  S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\R(                  4*S( jj5       r\SSSSSSSSSSSSSSSSSS).S\\   S&\RH                  S\S#   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\RJ                  S\RL                  S'\RN                  S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\\R,                     4*S* jj5       r\\(\(SSSSS+.S\)\\	R                  \	R                  4      S\)\   S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S,\S\\R(                  \\R,                     4   4S- jj5       r\(\(SSSSS+.S\)\\	R                  \	R                  4      S\)\   S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S,\S\\R(                  \\R,                     4   4S. jjr\SSSSSSSS/.S0\S\\S   S4   S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\R(                  4S3 jj5       r*\SSSSSSS4.S0\S\S#   S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\\R,                     4S5 jj5       r*\SSSSSSS4.S0\S\S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\\R(                  \\R,                     4   4S6 jj5       r*SSSSSSSS/.S0\S\\   S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\\R(                  \\R,                     4   4S7 jjr*SSSSS8.S0\S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      4
S9 jjr+SSSSS8.S0\S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\R(                  4S: jjr,S;r-g)<Interactions   c                     [        U 5      $ N)InteractionsWithRawResponseselfs    a/var/www/html/leaf-doctor-v1/venv/lib/python3.13/site-packages/google/genai/_gaos/interactions.pywith_raw_responseInteractions.with_raw_response   s    *400    c                     [        U 5      $ r"   )!InteractionsWithStreamingResponser$   s    r&   with_streaming_response$Interactions.with_streaming_response#   s    066r)   Nextra_headersextra_query
extra_bodytimeoutrequestr/   r0   r1   r2   returnc                    ga  Creating an interaction

Creates a new interaction.

:param body: The request body.
:param api_version: Which version of the API to use.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param extra_body: Additional JSON object fields to merge into request bodies.
:param timeout: Override the default request timeout configuration for this method in seconds
N r%   r3   r/   r0   r1   r2   s         r&   createInteractions.create'       r)   .api_versionstreamstore
backgroundsystem_instructiontoolsresponse_modalitiesresponse_mime_typeprevious_interaction_idservice_tierwebhook_configresponse_formatenvironmentgeneration_configcached_contentr/   r0   r1   r2   r=   modelr>   Fr?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   inputc                    ga/  Creating an interaction

Creates a new interaction.

:param api_version: Which version of the API to use.
:param model: The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
:param stream: Input only. Whether the interaction will be streamed.
:param store: Input only. Whether to store the response and request for later retrieval.
:param background: Input only. Whether to run the model interaction in the background.
:param system_instruction: System instruction for the interaction.
:param tools: A list of tool declarations the model may call during interaction.
:param response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).
:param response_mime_type: The mime type of the response. This is required if response_format is set.
:param previous_interaction_id: The ID of the previous interaction, if any.
:param service_tier:
:param webhook_config: Message for configuring webhook events for a request.
:param response_format: Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
:param environment: The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
:param generation_config: Configuration parameters for model interactions.
:param cached_content: The name of the cached content used as context to serve the prediction.
    Note: only used in explicit caching, where users can have control over
    caching (e.g. what content to cache) and enjoy guaranteed cost savings.
    Format:
    `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
:param input: The input for the interaction.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param extra_body: Additional JSON object fields to merge into request bodies.
:param timeout: Override the default request timeout configuration for this method in seconds
Nr7   r%   r=   rL   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rM   r/   r0   r1   r2   s                         r&   r9   r:   ?   r;   r)   r=   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   r/   r0   r1   r2   Tc                    grO   r7   rP   s                         r&   r9   r:   x   r;   r)   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   agent_configr/   r0   r1   r2   agentrT   c                    gaz  Creating an interaction

Creates a new interaction.

:param api_version: Which version of the API to use.
:param agent: The agent to interact with.
:param stream: Input only. Whether the interaction will be streamed.
:param store: Input only. Whether to store the response and request for later retrieval.
:param background: Input only. Whether to run the model interaction in the background.
:param system_instruction: System instruction for the interaction.
:param tools: A list of tool declarations the model may call during interaction.
:param response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).
:param response_mime_type: The mime type of the response. This is required if response_format is set.
:param previous_interaction_id: The ID of the previous interaction, if any.
:param service_tier:
:param webhook_config: Message for configuring webhook events for a request.
:param response_format: Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
:param environment: The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
:param agent_config: Configuration parameters for the agent interaction.
:param input: The input for the interaction.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param extra_body: Additional JSON object fields to merge into request bodies.
:param timeout: Override the default request timeout configuration for this method in seconds
Nr7   r%   r=   rU   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rT   rM   r/   r0   r1   r2   s                        r&   r9   r:      r;   r)   r=   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rT   r/   r0   r1   r2   c                    grW   r7   rX   s                        r&   r9   r:      r;   r)   r3   r=   r/   r0   r1   r2   body_kwargsc                    g  Creating an interaction

Creates a new interaction.

:param api_version: Which version of the API to use.
:param model: The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
:param stream: Input only. Whether the interaction will be streamed.
:param store: Input only. Whether to store the response and request for later retrieval.
:param background: Input only. Whether to run the model interaction in the background.
:param system_instruction: System instruction for the interaction.
:param tools: A list of tool declarations the model may call during interaction.
:param response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).
:param response_mime_type: The mime type of the response. This is required if response_format is set.
:param previous_interaction_id: The ID of the previous interaction, if any.
:param service_tier:
:param webhook_config: Message for configuring webhook events for a request.
:param response_format: Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
:param environment: The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
:param generation_config: Configuration parameters for model interactions.
:param cached_content: The name of the cached content used as context to serve the prediction.
    Note: only used in explicit caching, where users can have control over
    caching (e.g. what content to cache) and enjoy guaranteed cost savings.
    Format:
    `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
:param input: The input for the interaction.
:param agent: The agent to interact with.
:param agent_config: Configuration parameters for the agent interaction.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param extra_body: Additional JSON object fields to merge into request bodies.
:param timeout: Override the default request timeout configuration for this method in seconds
Nr7   r%   r3   r=   r/   r0   r1   r2   r\   s           r&   r9   r:     r;   r)   c                f	  ^ ^^ SU;   a  SU;   a  [        S5      eSU;   a  SU;   a  [        S5      eSU;   a  SU;   a  [        S5      eSU;   a  SU;   a  [        S5      eS	U;   a  SU;   a  [        S
5      eS	U;   a  SU;   a  [        S5      eSnSn	[        n
SnUnT R                  U5      nUc  T R                  R                  nUb  UnOT R                  X5      nT[        Lac  [        [        R                  [        T[        5      (       a  TO2[        R                  " [        [        T5      [        R                  5      5      mO[        U5      nUR                  5        VVs0 s H  u  nnU[        Ld  M  UU_M     nnnSU0nUR                  5        VVs0 s H  u  nnU[        Ld  M  UU_M     nnnUUS'   [        [        R                  [        R                  " U[        R                  5      5      m[         R"                  " U5      u  nnT R%                  SSUU	TSSSS['        ['        TSS5      SS5      SL a  SOSUU[        R(                  " T R                  R*                  R,                  S9T R                  R.                  UU4S jSUS9nU
[        :X  ab  T R                  R0                  [        La  T R                  R0                  n
O.[        R2                  " S[        R4                  " SSSS5      SSS 9n
Sn[        U
[        R2                  5      (       a  U
/ S!Q4nU 4S" jn[7        T R                  U=(       d    S#S$S[9        T R                  R.                  [:        R<                  5      [?        US%S&9S'9nT RA                  UUS( ['        ['        TSS5      SS5      SL =(       d    US):H  US*9nUS+:w  a  US):X  a  [         RB                  O[         RD                  n[        [        U" UU['        ['        TSS5      SS5      SL a  S,OS-T [G        U5      T R                  RH                  RK                  S.5      S/95      $  U" U5      $ s  snnf s  snnf ! [L         aC  n[         RN                  " T R                  RH                  S.   [G        U5      UU5         SnAgSnAff = f)0r_   rL   rU   'Cannot supply both 'model' and 'agent'.rT   .Cannot supply both 'model' and 'agent_config'.rJ   3Cannot supply both 'generation_config' and 'agent'.:Cannot supply both 'generation_config' and 'agent_config'.rK   0Cannot supply both 'cached_content' and 'agent'.7Cannot supply both 'cached_content' and 'agent_config'.Nr=   bodyPOST/{api_version}/interactionsT
user-agentr>   Ftext/event-streamapplication/jsonr=   c            	      f   > [         R                  " TR                  SSS[        R                  T S9$ NFjson)r1   r   serialize_request_bodyrh   r   CreateInteractionRequestBodyr1   r3   s   r&   <lambda>%Interactions.create.<locals>.<lambda>  ,    (D(D33%)r)   methodpathbase_urlurl_variablesr3   request_body_requiredrequest_has_path_paramsrequest_has_query_paramsuser_agent_headeraccept_header_valuehttp_headersextra_query_params_globalssecurityget_serialized_bodyallow_empty_value
timeout_msattempt-count-backoff  @     0u     max_retries4084094295XXc                   > S n[         R                  " U SS5      (       a/  [         R                  " U 5      n[        [        R
                  XSS9$ [         R                  " U SS5      (       a  [        U S STS9$ [         R                  " U S	S5      (       aH  [         R                  " U 5      n [        [        R                  X5      n[        R                  " XU5      e[         R                  " U SS5      (       aH  [         R                  " U 5      n [        [        R                  X5      n[        R                  " XU5      e[         R                  " U 5      n[        R                  " SX5      e! [        R                   a  n[        R                  " S
U U5      UeS nAff = f! [        R                   a  n[        R                  " S
U U5      UeS nAff = f)N200rm   Fvalidaterl   c                 `    [         R                  " U [        R                  5      R                  $ r"   r   unmarshal_jsonr   InteractionSSEStreamEventdataraws    r&   rv   HInteractions.create.<locals>._speakeasy_parse_response.<locals>.<lambda>  $     4 4\CC!d!r)   [DONE]sentinel
client_ref4XX1Error response body did not match expected schemar   Unexpected response received)r   match_responsestream_to_textr   r   Interactionr   r    CreateInteractionClientErrorDataCreateInteractionClientErrorResponseValidationErrorGenAiDefaultError CreateInteractionServerErrorDataCreateInteractionServerErrorhttp_resresponse_datahttp_res_texter%   s       r&   _speakeasy_parse_response6Interactions.create.<locals>._speakeasy_parse_response  s   !%M##He5GHH % 4 4X >. ,,hPU  ##He5HII &#  ##He5GHH % 4 4X >$;??%M !==%  ##He5GHH % 4 4X >$;??%M !==%  "00:M**. / 55  22K % 	 55  22K % 	s0   .1E1 1F& 1F#FF#&G:GG CreateInteractionsyncmode	executionconfigr|   operation_idoauth2_scopessecurity_sourceresponsec                 4    [         R                  " SS/U 5      $ Nr   r   r   match_status_codescs    r&   rv   rw         5+C+CUENTU+Vr)   	streaminghook_ctxr3   is_error_status_coder>   retry_configparsedevent_streambuffered_hooksr   parserr   r   r   hooks)(
ValueErrorr   _coerce_timeout_mssdk_configurationr   _get_urlr   r   CreateInteractionRequest
isinstancer   r   	unmarshalr   dictitemsr   consume_response_mode_build_requestgetattrCreateInteractionGlobalsglobalsr=   r   r   RetryConfigBackoffStrategyr   r   r   Securityr	   
do_requestStreamedAPIResponseAPIResponser   __dict__get	Exceptionraise_parse_errorr%   r3   r=   r/   r0   r1   r2   r\   r|   r}   retries
server_urlr   r   _body_kwargskv_request_kwargs_speakeasy_response_modereqr   r   _speakeasy_hook_ctxr   _speakeasy_response_cls
parse_exc_s   ``   `                    r&   r9   r:   F  s   Z k!g&<FGGk!n&CMNN+-'[2HRSS+-.K2OL  {*w+/EOPP{*~/LVWW7<
$,,W5
//::J!!H}}X=H%//gy11 __g&(G(G	G  ,L-9-?-?-AT-ATQQe^DAqD-ALT/<k.JO!0!6!6!8!8AAUN1!8   '3OF#//1P1PQG
 2B1W1W2
. , !!.'"&$(%)*ww5xG4O !4#%*44 22::FF ++44! #!9 " 
> e%%22%?00==+++))#tQ> !	 gu0011#%ABL2	h *))^,1&&// %*BfU	
 ??(!V77FD98UKtS 7';6% # 
 $x/ ,{: !44%11 $
 ' 4 #77FD#A8US  ' (#34GH0099==hG  	,X66s Up  	..&&//9&':;	 	s0   'Q;QQ0QQ# #
R0-9R++R0r>   last_event_idinclude_inputr=   r/   r0   r2   idr   r   c                    g  Retrieving an interaction

Retrieves the full details of a single interaction based on its `Interaction.id`.

:param id: The unique identifier of the interaction to retrieve.
:param stream: If set to true, the generated content will be streamed incrementally.
:param last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
:param include_input: If set to true, includes the input in the response.
:param api_version: Which version of the API to use.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param timeout: Override the default request timeout configuration for this method in seconds
Nr7   	r%   r  r>   r   r   r=   r/   r0   r2   s	            r&   r   Interactions.get<  r;   r)   r   r   r=   r/   r0   r2   c                    gr  r7   r  s	            r&   r   r  W  r;   r)   c                    gr  r7   r  s	            r&   r   r  r  r;   r)   c                  ^  Sn	Sn
[         nSnUnT R                  U5      nUc  T R                  R                  nUb  Un	OT R	                  X5      n	[
        R                  " UUUUUS9n[        R                  " U5      u  nnT R                  SSU	U
USSSSUSL a  SOS	UU[
        R                  " T R                  R                  R                  S
9T R                  R                  SUS9nU[         :X  ab  T R                  R                  [         La  T R                  R                  nO.[        R                   " S[        R"                  " SSSS5      SSS9nSn[%        U[        R                   5      (       a  U/ SQ4nU 4S jn['        T R                  U	=(       d    SSS[)        T R                  R                  [*        R,                  5      [/        USS9S9nT R1                  UUS USL =(       d    US:H  US9nUS:w  ar  US:X  a  [        R2                  O[        R4                  n[7        [8        U" UUUSL a  SOST [;        U5      T R                  R<                  R?                  S 5      S!95      $  U" U5      $ ! [@         aC  n[        RB                  " T R                  R<                  S    [;        U5      UU5         SnAgSnAff = f)"r  Nr  r>   r   r   r=   GET /{api_version}/interactions/{id}FTrk   rl   rm   rn   rz   r{   r|   r}   r3   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                   > S n[         R                  " U SS5      (       a/  [         R                  " U 5      n[        [        R
                  XSS9$ [         R                  " U SS5      (       a  [        U S STS9$ [         R                  " U S	S5      (       aI  [         R                  " U 5      n [        [        R                  U U5      n[        R                  " XU5      e[         R                  " U SS5      (       aI  [         R                  " U 5      n [        [        R                  U U5      n[        R                  " XU5      e[         R                  " U 5      n[        R                  " SX5      e! [        R                   a  n[        R                  " S
U U5      UeS nAff = f! [        R                   a  n[        R                  " S
U U5      UeS nAff = f)Nr   rm   Fr   rl   c                 `    [         R                  " U [        R                  5      R                  $ r"   r   r   s    r&   rv   EInteractions.get.<locals>._speakeasy_parse_response.<locals>.<lambda>  r   r)   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   !GetInteractionByIDClientErrorDataGetInteractionByIDClientErrorr   r   !GetInteractionByIDServerErrorDataGetInteractionByIDServerErrorr   s       r&   r   3Interactions.get.<locals>._speakeasy_parse_response  s   !%M##He5GHH % 4 4X >. ,,hPU  ##He5HII &#  ##He5GHH % 4 4X >$;@@ %%M
 !>>%  ##He5GHH % 4 4X >$;@@ %%M
 !>>%  "00:M**. 3 55  22K % 	" 55  22K % 	s0   .2E3 2F( 3F%F  F%(G<GGr   getInteractionByIdr   r   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   "Interactions.get.<locals>.<lambda>*  r   r)   r   r   r   r   r   r   r   )"r   r   r   r   r   r   GetInteractionByIDRequestr   r   r   GetInteractionByIDGlobalsr   r=   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r%   r  r>   r   r   r=   r/   r0   r2   r|   r}   r   r   r   r   r3   r   r   r   r   r   r   r   r   s   `                       r&   r   r    s   2 7<
$,,W5
//::J!!H}}X=H22''#
 2B1W1W2
. , !!3'"'$(%)*~ !4#%*55 22::FF ++44"!) " 
. e%%22%?00==+++))#tQ> !	 gu0011#%ABL6	p *))^-1&&// %*BfU	
 ??(!VT>L%=%L% # 
 $x/ ,{: !44%11 $
 ' 4,2dN.
#34GH0099==hG
 
	,X66 	..&&//9&':;	 	s   4I< <
K	9KK	r=   r/   r0   r2   c                V   SnSn[         nSn	Un
U R                  U5      nUc  U R                  R                  nU	b  U	nOU R	                  Xg5      n[
        R                  " UUS9n[        R                  " U
5      u  pU R                  SSUUUSSSSSU
U[
        R                  " U R                  R                  R                  S	9U R                  R                  SUS
9nU[         :X  ab  U R                  R                  [         La  U R                  R                  nO.[        R                   " S[        R"                  " SSSS5      SSS9nSn[%        U[        R                   5      (       a  U/ SQ4nS n['        U R                  U=(       d    SSS[)        U R                  R                  [*        R,                  5      [/        USS9S9nU R1                  UUS US:H  US9nUS:w  ak  US:X  a  [        R2                  O[        R4                  n[7        [8        U" UUSU [;        U5      U R                  R<                  R?                  S5      S95      $  U" U5      $ ! [@         aC  n[        RB                  " U R                  R<                  S   [;        U5      UU5         SnAgSnAff = f)   Deleting an interaction

Deletes the interaction by id.

:param id: The unique identifier of the interaction to delete.
:param api_version: Which version of the API to use.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param timeout: Override the default request timeout configuration for this method in seconds
Nr  r=   DELETEr  FTrk   rm   rn   r  r   r   r   r   r   r   r   r   c                    S n[         R                  " U SS5      (       a  g [         R                  " U SS5      (       a1   [        [        R                  U 5      n[        R
                  " X5      e[         R                  " U SS5      (       a1   [        [        R                  U 5      n[        R                  " X5      e[        R                  " SU 5      e! [        R                   a(  n[        R                  " SU U R                  5      UeS nAff = f! [        R                   a(  n[        R                  " SU U R                  5      UeS nAff = fNr   *r   rm   r   r   r   r   r   r   r    DeleteInteractionClientErrorDataDeleteInteractionClientErrorr   r   text DeleteInteractionServerErrorDataDeleteInteractionServerErrorr   r   r   s      r&   r   6Interactions.delete.<locals>._speakeasy_parse_response  s6   !%M##HeS99##He5GHH
$;??%M !==mVV ##He5GHH
$;??%M !==mVV **+I8TT' 55  22K   	 55  22K   	s/   0C 0D D(#DDE'#E

Er   deleteInteractionr   r   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   %Interactions.delete.<locals>.<lambda>  r   r)   r   r   r   r   r   r   )"r   r   r   r   r   r   DeleteInteractionRequestr   r   r   DeleteInteractionGlobalsr   r=   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r%   r  r=   r/   r0   r2   r|   r}   r   r   r   r   r3   r   r   r   r   r   r   r   r   s                        r&   deleteInteractions.deleteI  s   & 7<
$,,W5
//::J!!H}}X=H11#

 2B1W1W2
.  !!3'"'$(%)* 2%*44 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu0011#%ABL	U> *))^,1&&// %*BfU	
 ??(!V+{:% # 
 $x/ ,{: !44%11 $
 ' 4##34GH0099==hG
 
	,X66 	..&&//9&':;	 	   I 
J(%9J##J(c                V   SnSn[         nSn	Un
U R                  U5      nUc  U R                  R                  nU	b  U	nOU R	                  Xg5      n[
        R                  " UUS9n[        R                  " U
5      u  pU R                  SSUUUSSSSSU
U[
        R                  " U R                  R                  R                  S	9U R                  R                  SUS
9nU[         :X  ab  U R                  R                  [         La  U R                  R                  nO.[        R                   " S[        R"                  " SSSS5      SSS9nSn[%        U[        R                   5      (       a  U/ SQ4nS n['        U R                  U=(       d    SSS[)        U R                  R                  [*        R,                  5      [/        USS9S9nU R1                  UUS US:H  US9nUS:w  ak  US:X  a  [        R2                  O[        R4                  n[7        [8        U" UUSU [;        U5      U R                  R<                  R?                  S5      S95      $  U" U5      $ ! [@         aC  n[        RB                  " U R                  R<                  S   [;        U5      UU5         SnAgSnAff = f)   Canceling an interaction

Cancels an interaction by id. This only applies to background interactions that are still running.

:param id: The unique identifier of the interaction to cancel.
:param api_version: Which version of the API to use.
:param extra_headers: Additional headers to set or replace on requests.
:param extra_query: Additional query parameters to append to requests.
:param timeout: Override the default request timeout configuration for this method in seconds
Nr   ri   '/{api_version}/interactions/{id}/cancelFTrk   rm   rn   r  r   r   r   r   r   r   r   r   c                    S n[         R                  " U SS5      (       a  [        [        R                  U SS9$ [         R                  " U SS5      (       a1   [        [
        R                  U 5      n[
        R                  " X5      e[         R                  " U SS5      (       a1   [        [
        R                  U 5      n[
        R                  " X5      e[
        R                  " SU 5      e! [
        R                   a(  n[
        R                  " SU U R                  5      UeS nAff = f! [
        R                   a(  n[
        R                  " SU U R                  5      UeS nAff = f	Nr   rm   Fr   r   r   r   r   r   r   r   r   r   r   $CancelInteractionByIDClientErrorData CancelInteractionByIDClientErrorr   r   r(  $CancelInteractionByIDServerErrorData CancelInteractionByIDServerErrorr+  s      r&   r   6Interactions.cancel.<locals>._speakeasy_parse_response.  sZ   !%M##He5GHH. ,,h  ##He5GHH$;CCX%M !AA%  ##He5GHH$;CCX%M !AA%  **+I8TT+ 55  22K   	 55  22K   	s0   0C, %0D+ ,D( #D##D(+E'?#E""E'r   cancelInteractionByIdr   r   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   %Interactions.cancel.<locals>.<lambda>`  r   r)   r   r   r   r   r   r   )"r   r   r   r   r   r   CancelInteractionByIDRequestr   r   r   CancelInteractionByIDGlobalsr   r=   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r2  s                        r&   cancelInteractions.cancel  s   & 7<
$,,W5
//::J!!H}}X=H55#

 2B1W1W2
.  !!:'"'$(%)* 2%*88 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu0011#%ABL#	UJ *))^01&&// %*BfU	
 ??(!V+{:% # 
 $x/ ,{: !44%11 $
 ' 4##34GH0099==hG
 
	,X66 	..&&//9&':;	 	r5  r7   ).__name__
__module____qualname____firstlineno__propertyr'   r,   r   r   r   r   CreateInteractionRequestParamr   r   strr   floathttpxTimeoutr   r   r   InteractionSSEEventr9   Modelr   boolr   	ToolParamResponseModalityServiceTierWebhookConfigParam)CreateModelInteractionResponseFormatParam&CreateModelInteractionEnvironmentParamGenerationConfigParamInteractionsInputParamAgentOption)CreateAgentInteractionResponseFormatParam&CreateAgentInteractionEnvironmentParam&CreateAgentInteractionAgentConfigParamr   r   r   r3  rF  __static_attributes__r7   r)   r&   r   r      s   1 1 7 7  6:37269= ++V-Q-QQ
  S 12 gc3h/0 WS#X./ %u}} 456 
|''0P0P)QQ	R .  &*.2"%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 gend*+6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
	!	!16 6p  &* "%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
00	116 6p  &*.2"%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 gend*+0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
	!	!/0 0d  &* "%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
00	1/0 0d  -25937269=, "&1163W3WWX
, &c*,  S 12, gc3h/0, WS#X./, %u}} 456, , 
|''0P0P)QQ	R, ,f -25937269=t "&1163W3WWX
t &c*t  S 12t gc3h/0t WS#X./t %u}} 456t t 
|''0P0P)QQ	Rtl 
 /3'+(-%)59379= gend*+	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
	!	! 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
00	1 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
|''0P0P)QQ	R < "''+(-%)59379=zz 	z
  }z  ~z c]z  S 12z gc3h/0z %u}} 456z 
|''0P0P)QQ	Rz@ &*59379=VV c]	V
  S 12V gc3h/0V %u}} 456Vx &*59379=\\ c]	\
  S 12\ gc3h/0\ %u}} 456\ 
	!	!\ \r)   r   c                   &    \ rS rSrS\SS4S jrSrg)r#   i  sdkr4   Nc                 @   Xl         [        R                  " UR                  S5      U l        [        R                  " UR                  S5      U l        [        R                  " UR
                  S5      U l        [        R                  " UR                  S5      U l        g Nr/   )_sdkr   to_raw_response_wrapperr9   r   r3  rF  r%   rc  s     r&   __init__$InteractionsWithRawResponse.__init__  st    	&>>JJ
 $;;CGG_U&>>JJ
 '>>JJ
r)   rf  rF  r9   r3  r   rH  rI  rJ  rK  r   ri  ra  r7   r)   r&   r#   r#     s    
L 
T 
r)   r#   c                   &    \ rS rSrS\SS4S jrSrg)r+   i  rc  r4   Nc                 @   Xl         [        R                  " UR                  S5      U l        [        R                  " UR                  S5      U l        [        R                  " UR
                  S5      U l        [        R                  " UR                  S5      U l        g re  )rf  r   to_streamed_response_wrapperr9   r   r3  rF  rh  s     r&   ri  *InteractionsWithStreamingResponse.__init__  sy    	&CCJJ
 $@@GG_
 'CCJJ
 'CCJJ
r)   rk  rl  r7   r)   r&   r+   r+     s    
L 
T 
r)   r+   c            /          \ rS rSr\S 5       r\S 5       r\SSSSS.S\\	R                  \	R                  4   S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\\R(                  \\R,                     4   4S jj5       r\SSSSSSSSSSSSSSSSSSSS.S\\   S\R0                  S\\S   S4   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\R@                  S\RB                  S\RD                  S\S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\R(                  4,S! jj5       r\SSSSSSSSSSSSSSSSSSS".S\\   S\R0                  S\S#   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\R@                  S\RB                  S\RD                  S\S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\\R,                     4,S$ jj5       r\SSSSSSSSSSSSSSSSSSS%.S\\   S&\RH                  S\\S   S4   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\RJ                  S\RL                  S'\RN                  S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\R(                  4*S( jj5       r\SSSSSSSSSSSSSSSSSS).S\\   S&\RH                  S\S#   S\S\S\S\\R8                     S\\R:                     S\S\S\R<                  S\R>                  S\RJ                  S\RL                  S'\RN                  S \RF                  S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S\\R,                     4*S* jj5       r\\(\(SSSSS+.S\)\\	R                  \	R                  4      S\)\   S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S,\S\\R(                  \\R,                     4   4S- jj5       r\(\(SSSSS+.S\)\\	R                  \	R                  4      S\)\   S\\\\4      S\\\\4      S	\\\\4      S
\\\\R$                  4      S,\S\\R(                  \\R,                     4   4S. jjr\SSSSSSSS/.S0\S\\S   S4   S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\R(                  4S3 jj5       r*\SSSSSSS4.S0\S\S#   S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\\R,                     4S5 jj5       r*\SSSSSSS4.S0\S\S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\\R(                  \\R,                     4   4S6 jj5       r*SSSSSSSS/.S0\S\\   S1\\   S2\\   S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\\R(                  \\R,                     4   4S7 jjr*SSSSS8.S0\S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      4
S9 jjr+SSSSS8.S0\S\\   S\\\\4      S\\\\4      S
\\\\R$                  4      S\R(                  4S: jjr,S;r-g)<AsyncInteractionsi  c                     [        U 5      $ r"   ) AsyncInteractionsWithRawResponser$   s    r&   r'   #AsyncInteractions.with_raw_response  s    /55r)   c                     [        U 5      $ r"   )&AsyncInteractionsWithStreamingResponser$   s    r&   r,   )AsyncInteractions.with_streaming_response  s    5d;;r)   Nr.   r3   r/   r0   r1   r2   r4   c                   #    g7fr6   r7   r8   s         r&   r9   AsyncInteractions.create          .r<   r=   rL   r>   Fr?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rM   c                   #    g7frO   r7   rP   s                         r&   r9   rz    r{  r|  rQ   Tc                   #    g7frO   r7   rP   s                         r&   r9   rz    r{  r|  rS   rU   rT   c                   #    g7frW   r7   rX   s                        r&   r9   rz  3  r{  r|  rY   c                   #    g7frW   r7   rX   s                        r&   r9   rz  f  r{  r|  r[   r\   c                   #    g7fr^   r7   r`   s           r&   r9   rz    r{  r|  c                P
  ^ ^^#    SU;   a  SU;   a  [        S5      eSU;   a  SU;   a  [        S5      eSU;   a  SU;   a  [        S5      eSU;   a  SU;   a  [        S5      eS	U;   a  SU;   a  [        S
5      eS	U;   a  SU;   a  [        S5      eSnSn	[        n
SnUnT R                  U5      nUc  T R                  R                  nUb  UnOT R                  X5      nT[        Lac  [        [        R                  [        T[        5      (       a  TO2[        R                  " [        [        T5      [        R                  5      5      mO[        U5      nUR                  5        VVs0 s H  u  nnU[        Ld  M  UU_M     nnnSU0nUR                  5        VVs0 s H  u  nnU[        Ld  M  UU_M     nnnUUS'   [        [        R                  [        R                  " U[        R                  5      5      m[         R"                  " U5      u  nnT R%                  SSUU	TSSSS['        ['        TSS5      SS5      SL a  SOSUU[        R(                  " T R                  R*                  R,                  S9T R                  R.                  UU4S jSUS9nU
[        :X  ab  T R                  R0                  [        La  T R                  R0                  n
O.[        R2                  " S[        R4                  " SSSS5      SSS 9n
Sn[        U
[        R2                  5      (       a  U
/ S!Q4nU 4S" jn[7        T R                  U=(       d    S#S$S[9        T R                  R.                  [:        R<                  5      [?        US%S&9S'9nT RA                  UUS( ['        ['        TSS5      SS5      SL =(       d    US):H  US*9I Sh  vN nUS+:w  a  US):X  a  [         RB                  O[         RD                  n[        [        U" UU['        ['        TSS5      SS5      SL a  S,OS-T [G        U5      T R                  RH                  RK                  S.5      T R                  RH                  RK                  S/5      S095      $  U" U5      I Sh  vN $ s  snnf s  snnf  N N! [L         a|  n[         RN                  " T R                  RH                  RK                  S/5      T R                  RH                  RK                  S.5      [G        U5      UU5      I Sh  vN     SnAgSnAff = f7f)1r_   rL   rU   rb   rT   rc   rJ   rd   re   rK   rf   rg   Nr=   rh   ri   rj   Trk   r>   Frl   rm   rn   c            	      f   > [         R                  " TR                  SSS[        R                  T S9$ rp   rr   ru   s   r&   rv   *AsyncInteractions.create.<locals>.<lambda>=  rx   r)   ry   r   r   r   r   r   r   r   r   c                   >#    S n[         R                  " U SS5      (       a7  [         R                  " U 5      I S h  vN n[        [        R
                  XSS9$ [         R                  " U SS5      (       a  [        U S STS9$ [         R                  " U S	S5      (       aP  [         R                  " U 5      I S h  vN n [        [        R                  X5      n[        R                  " XU5      e[         R                  " U SS5      (       aP  [         R                  " U 5      I S h  vN n [        [        R                  X5      n[        R                  " XU5      e[         R                  " U 5      I S h  vN n[        R                  " SX5      e GNW N! [        R                   a  n[        R                  " S
U U5      UeS nAff = f N! [        R                   a  n[        R                  " S
U U5      UeS nAff = f N7f)Nr   rm   Fr   rl   c                 `    [         R                  " U [        R                  5      R                  $ r"   r   r   s    r&   rv   MAsyncInteractions.create.<locals>._speakeasy_parse_response.<locals>.<lambda>b  r   r)   r   r   r   r   r   r   )r   r   stream_to_text_asyncr   r   r   r   r   r   r   r   r   r   r   r   s       r&   r   ;AsyncInteractions.create.<locals>._speakeasy_parse_responseX  s    !%M##He5GHH&+&@&@&J J. ,,hPU  ##He5HII" &#  ##He5GHH&+&@&@&J J$;??%M !==%  ##He5GHH&+&@&@&J J$;??%M !==%  #("<"<X"FFM**. [ !K !K 55  22K % 	 !K 55  22K % 	 Gs   9HFA=H:F;H 1F 16H'G(H-1G H7H8HHG
,GG

HH#G<<HHr   r   asyncr   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   r    r   r)   r   r   r   r   r   r   _async_hooksr   r   r   r   r   r   async_hooks)(r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   _build_request_asyncr   r   r   r=   r   r   r   r   r   r   r   r   r	   do_request_asyncAsyncStreamedAPIResponseAsyncAPIResponser   r   r   r   raise_parse_error_asyncr   s   ``   `                    r&   r9   rz    s(    Z k!g&<FGGk!n&CMNN+-'[2HRSS+-.K2OL  {*w+/EOPP{*~/LVWW7<
$,,W5
//::J!!H}}X=H%//gy11 __g&(G(G	G  ,L-9-?-?-AT-ATQQe^DAqD-ALT/<k.JO!0!6!6!8!8AAUN1!8   '3OF#//1P1PQG
 2B1W1W2
. , ''.'"&$(%)*ww5xG4O !4#%*44 22::FF ++44! #!9 ( 
> e%%22%?00==+++))#tQ> !	 gu0011#%ABL2	h *))^,1&&// %*BgV	
 ..(!V77FD98UKtS 7';6% / 
 
 $x/ ,{: !99%66 $
 ' 4 #77FD#A8US  ' (#34GH0099==hG $ 6 6 ? ? C CN S "		28<<<u Up
@ = 	"::&&//33NC&&//33H=&':;  	s   E$T&)R=RT&R2R9HT&RB6T&=R R	R T&R 
T#'A,TTTT&T##T&r   r  r   r   c                   #    g7fr  r7   r  s	            r&   r   AsyncInteractions.get  r{  r|  r  c                   #    g7fr  r7   r  s	            r&   r   r    r{  r|  c                   #    g7fr  r7   r  s	            r&   r   r    r{  r|  c                  ^ #    Sn	Sn
[         nSnUnT R                  U5      nUc  T R                  R                  nUb  Un	OT R	                  X5      n	[
        R                  " UUUUUS9n[        R                  " U5      u  nnT R                  SSU	U
USSSSUSL a  SOS	UU[
        R                  " T R                  R                  R                  S
9T R                  R                  SUS9nU[         :X  ab  T R                  R                  [         La  T R                  R                  nO.[        R                   " S[        R"                  " SSSS5      SSS9nSn[%        U[        R                   5      (       a  U/ SQ4nU 4S jn['        T R                  U	=(       d    SSS[)        T R                  R                  [*        R,                  5      [/        USS9S9nT R1                  UUS USL =(       d    US:H  US9I Sh  vN nUS:w  a  US:X  a  [        R2                  O[        R4                  n[7        [8        U" UUUSL a  SOST [;        U5      T R                  R<                  R?                  S 5      T R                  R<                  R?                  S!5      S"95      $  U" U5      I Sh  vN $  N N! [@         a|  n[        RB                  " T R                  R<                  R?                  S!5      T R                  R<                  R?                  S 5      [;        U5      UU5      I Sh  vN     SnAgSnAff = f7f)#r  Nr  r  r  FTrk   rl   rm   rn   r  r   r   r   r   r   r   r   r   c                   >#    S n[         R                  " U SS5      (       a7  [         R                  " U 5      I S h  vN n[        [        R
                  XSS9$ [         R                  " U SS5      (       a  [        U S STS9$ [         R                  " U S	S5      (       aQ  [         R                  " U 5      I S h  vN n [        [        R                  U U5      n[        R                  " XU5      e[         R                  " U SS5      (       aQ  [         R                  " U 5      I S h  vN n [        [        R                  U U5      n[        R                  " XU5      e[         R                  " U 5      I S h  vN n[        R                  " SX5      e GNY N! [        R                   a  n[        R                  " S
U U5      UeS nAff = f N! [        R                   a  n[        R                  " S
U U5      UeS nAff = f N7f)Nr   rm   Fr   rl   c                 `    [         R                  " U [        R                  5      R                  $ r"   r   r   s    r&   rv   JAsyncInteractions.get.<locals>._speakeasy_parse_response.<locals>.<lambda>s  r   r)   r   r   r   r   r   r   )r   r   r  r   r   r   r   r   r  r  r   r   r  r  r   s       r&   r   8AsyncInteractions.get.<locals>._speakeasy_parse_responsei  s    !%M##He5GHH&+&@&@&J J. ,,hPU  ##He5HII" &#  ##He5GHH&+&@&@&J J$;@@ %%M
 !>>%  ##He5GHH&+&@&@&J J$;@@ %%M
 !>>%  #("<"<X"FFM**. c !K !K 55  22K % 	 !K 55  22K % 	 Gs   9HFA=H:F;H 2F 26H(G)H.2G  H9H:HHG.GGHH%G>>HHr   r  r  r   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   'AsyncInteractions.get.<locals>.<lambda>  r   r)   r   r   r   r   r   r   r  r  )"r   r   r   r   r   r   r  r   r   r  r  r   r=   r   r   r   r   r   r   r   r   r   r   r	   r  r  r  r   r   r   r   r   r   r  r  s   `                       r&   r   r    sJ    2 7<
$,,W5
//::J!!H}}X=H22''#
 2B1W1W2
. , ''3'"'$(%)*~ !4#%*55 22::FF ++44"!) ( 
. e%%22%?00==+++))#tQ> !	 gu0011#%ABL6	p *))^-1&&// %*BgV	
 ..(!VT>L%=%L% / 
 
 $x/ ,{: !99%66 $
 ' 4,2dN.
#34GH0099==hG $ 6 6 ? ? C CN S 		28<<<5
4 = 	"::&&//33NC&&//33H=&':;  	s\   G=L? J2B L?"J6 -J4.J6 1L?4J6 6
L< A,L7,L/-L72L?7L<<L?r  c                @  #    SnSn[         nSn	Un
U R                  U5      nUc  U R                  R                  nU	b  U	nOU R	                  Xg5      n[
        R                  " UUS9n[        R                  " U
5      u  pU R                  SSUUUSSSSSU
U[
        R                  " U R                  R                  R                  S	9U R                  R                  SUS
9nU[         :X  ab  U R                  R                  [         La  U R                  R                  nO.[        R                   " S[        R"                  " SSSS5      SSS9nSn[%        U[        R                   5      (       a  U/ SQ4nS n['        U R                  U=(       d    SSS[)        U R                  R                  [*        R,                  5      [/        USS9S9nU R1                  UUS US:H  US9I Sh  vN nUS:w  a  US:X  a  [        R2                  O[        R4                  n[7        [8        U" UUSU [;        U5      U R                  R<                  R?                  S5      U R                  R<                  R?                  S5      S 95      $  U" U5      I Sh  vN $  N N! [@         a|  n[        RB                  " U R                  R<                  R?                  S5      U R                  R<                  R?                  S5      [;        U5      UU5      I Sh  vN     SnAgSnAff = f7f)!r  Nr   r!  r  FTrk   rm   rn   r  r   r   r   r   r   r   r   r   c                   #    S n[         R                  " U SS5      (       a  g [         R                  " U SS5      (       a1   [        [        R                  U 5      n[        R
                  " X5      e[         R                  " U SS5      (       a1   [        [        R                  U 5      n[        R                  " X5      e[        R                  " SU 5      e! [        R                   a(  n[        R                  " SU U R                  5      UeS nAff = f! [        R                   a(  n[        R                  " SU U R                  5      UeS nAff = f7fr#  r%  r+  s      r&   r   ;AsyncInteractions.delete.<locals>._speakeasy_parse_response  s8    !%M##HeS99##He5GHH
$;??%M !==mVV ##He5GHH
$;??%M !==mVV **+I8TT' 55  22K   	 55  22K   	sM   >E0C 1E0D ?ED*#DDEE)#EEEr   r-  r  r   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   *AsyncInteractions.delete.<locals>.<lambda>H  r   r)   r   r   r   r   r   r  r  )"r   r   r   r   r   r   r0  r   r   r  r1  r   r=   r   r   r   r   r   r   r   r   r   r   r	   r  r  r  r   r   r   r   r   r   r  r2  s                        r&   r3  AsyncInteractions.delete  s     & 7<
$,,W5
//::J!!H}}X=H11#

 2B1W1W2
.  ''3'"'$(%)* 2%*44 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu0011#%ABL	U> *))^,1&&// %*BgV	
 ..(!V+{:% / 
 
 $x/ ,{: !99%66 $
 ' 4##34GH0099==hG $ 6 6 ? ? C CN S 		28<<<5
4 = 	"::&&//33NC&&//33H=&':;  	\   G$L&J'BLJ JJ LJ 
LA,LLLLLLc                @  #    SnSn[         nSn	Un
U R                  U5      nUc  U R                  R                  nU	b  U	nOU R	                  Xg5      n[
        R                  " UUS9n[        R                  " U
5      u  pU R                  SSUUUSSSSSU
U[
        R                  " U R                  R                  R                  S	9U R                  R                  SUS
9nU[         :X  ab  U R                  R                  [         La  U R                  R                  nO.[        R                   " S[        R"                  " SSSS5      SSS9nSn[%        U[        R                   5      (       a  U/ SQ4nS n['        U R                  U=(       d    SSS[)        U R                  R                  [*        R,                  5      [/        USS9S9nU R1                  UUS US:H  US9I Sh  vN nUS:w  a  US:X  a  [        R2                  O[        R4                  n[7        [8        U" UUSU [;        U5      U R                  R<                  R?                  S5      U R                  R<                  R?                  S5      S 95      $  U" U5      I Sh  vN $  N N! [@         a|  n[        RB                  " U R                  R<                  R?                  S5      U R                  R<                  R?                  S5      [;        U5      UU5      I Sh  vN     SnAgSnAff = f7f)!r7  Nr   ri   r8  FTrk   rm   rn   r  r   r   r   r   r   r   r   r   c                   #    S n[         R                  " U SS5      (       a  [        [        R                  U SS9$ [         R                  " U SS5      (       a1   [        [
        R                  U 5      n[
        R                  " X5      e[         R                  " U SS5      (       a1   [        [
        R                  U 5      n[
        R                  " X5      e[
        R                  " SU 5      e! [
        R                   a(  n[
        R                  " SU U R                  5      UeS nAff = f! [
        R                   a(  n[
        R                  " SU U R                  5      UeS nAff = f7fr:  r;  r+  s      r&   r   ;AsyncInteractions.cancel.<locals>._speakeasy_parse_response  s\    !%M##He5GHH. ,,h  ##He5GHH$;CCX%M !AA%  ##He5GHH$;CCX%M !AA%  **+I8TT+ 55  22K   	 55  22K   	sN   AE,0C. 	E,'0D- E,.D*#D%%D**E,-E)#E$$E))E,r   rA  r  r   r   c                 4    [         R                  " SS/U 5      $ r   r   r   s    r&   rv   *AsyncInteractions.cancel.<locals>.<lambda>  r   r)   r   r   r   r   r   r  r  )"r   r   r   r   r   r   rD  r   r   r  rE  r   r=   r   r   r   r   r   r   r   r   r   r   r	   r  r  r  r   r   r   r   r   r   r  r2  s                        r&   rF  AsyncInteractions.canceli  s!    & 7<
$,,W5
//::J!!H}}X=H55#

 2B1W1W2
.  '':'"'$(%)* 2%*88 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu0011#%ABL#	UJ *))^01&&// %*BgV	
 ..(!V+{:% / 
 
 $x/ ,{: !99%66 $
 ' 4##34GH0099==hG $ 6 6 ? ? C CN S 		28<<<5
4 = 	"::&&//33NC&&//33H=&':;  	r  r7   ).rH  rI  rJ  rK  rL  r'   r,   r   r   r   r   rM  r   r   rN  r   rO  rP  rQ  r   r   r   rR  r9   rS  r   rT  r   rU  rV  rW  rX  rY  rZ  r[  r\  r]  r^  r_  r`  r   r   r   r3  rF  ra  r7   r)   r&   rr  rr    s   6 6 < <  6:37269= ++V-Q-QQ
  S 12 gc3h/0 WS#X./ %u}} 456 
|''\5U5U)VV	W .  &*.2"%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 gend*+6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
	!	!16 6p  &* "%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
\55	616 6p  &*.2"%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 gend*+0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
	!	!/0 0d  &* "%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
\55	6/0 0d  -25937269=, "&1163W3WWX
, &c*,  S 12, gc3h/0, WS#X./, %u}} 456, , 
|''\5U5U)VV	W, ,f -25937269=v "&1163W3WWX
v &c*v  S 12v gc3h/0v WS#X./v %u}} 456v v 
|''\5U5U)VV	Wvp 
 /3'+(-%)59379= gend*+	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
	!	! 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
\55	6 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
|''\5U5U)VV	W < "''+(-%)59379=|| 	|
  }|  ~| c]|  S 12| gc3h/0| %u}} 456| 
|''\5U5U)VV	W|D &*59379=XX c]	X
  S 12X gc3h/0X %u}} 456X| &*59379=^^ c]	^
  S 12^ gc3h/0^ %u}} 456^ 
	!	!^ ^r)   rr  c                   &    \ rS rSrS\SS4S jrSrg)rt  i
	  rc  r4   Nc                 @   Xl         [        R                  " UR                  S5      U l        [        R                  " UR                  S5      U l        [        R                  " UR
                  S5      U l        [        R                  " UR                  S5      U l        g re  )rf  r   async_to_raw_response_wrapperr9   r   r3  rF  rh  s     r&   ri  )AsyncInteractionsWithRawResponse.__init__	  sy    	&DDJJ
 $AAGG_
 'DDJJ
 'DDJJ
r)   rk  rH  rI  rJ  rK  rr  ri  ra  r7   r)   r&   rt  rt  
	      
- 
$ 
r)   rt  c                   &    \ rS rSrS\SS4S jrSrg)rw  i	  rc  r4   Nc                 @   Xl         [        R                  " UR                  S5      U l        [        R                  " UR                  S5      U l        [        R                  " UR
                  S5      U l        [        R                  " UR                  S5      U l        g re  )rf  r   "async_to_streamed_response_wrapperr9   r   r3  rF  rh  s     r&   ri  /AsyncInteractionsWithStreamingResponse.__init__	  sy    	&IIJJ
 $FFGG_
 'IIJJ
 'IIJJ
r)   rk  r  r7   r)   r&   rw  rw  	  r  r)   rw  )(__doc__r   r   r   r   r   r   r   r   r	   basesdkr
   r   r   r   r   r   r   r   utils.eventstreamingr   r   utils.unmarshal_json_responser   rP  typingr   r   r   r   r   r   r   r   r   r#   r+   rr  rt  rw  r7   r)   r&   <module>r     s{   " H * * H H * C C : 5 B  O O O_7 _D#
 

 
"g gT#
 
"
 
r)   