
    UEjm                    8   d Z ddlmZmZmZmZ ddlmZmZm	Z	 ddl
mZmZ ddlmZmZmZmZ ddlmZmZmZmZ ddlmZm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&  G d de      Z' G d d      Z( G d d      Z) G d de      Z* G d d      Z+ G d d      Z,y
)zACode generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.   )errorsmodelstypesutils)AfterParseErrorContextHookContextResponseContext)AsyncBaseSDKBaseSDK)OptionalNullableUNSETinteractionswebhooks)pingwebhookrequestrotatesigningsecretrequestwebhookwebhookupdate)get_security_from_envresponse_helpers)unmarshal_json_response    N)AnyIterableListMappingOptionalUnioncastc                   P   e Zd Zed        Zed        Zddddddddedeej                     de
e   de
e   d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dej$                  fdZdddddddde
e   de
e   de
e   d	e
eeef      d
e
eeef      de
eeej                   f      dej*                  fdZddddddede
e   d	e
eeef      d
e
eeef      de
eeej                   f      dej$                  fdZddddddddddd
dede
e   de
e   de
e   de
e   de
eej2                        de
ej4                     d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dej$                  fdZddddddede
e   d	e
eeef      d
e
eeef      de
eeej                   f      dej:                  fdZddddddddede
e   de
ej@                     d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dejB                  fdZ"ddddddddede
e   de
ee#jH                  e#jJ                  f      d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dejL                  fd Z'y)!Webhooksc                     t        |       S N)WebhooksWithRawResponseselfs    Q/var/www/html/qr/venv/lib/python3.12/site-packages/google/genai/_gaos/webhooks.pywith_raw_responsezWebhooks.with_raw_response$   s    &t,,    c                     t        |       S r"   )WebhooksWithStreamingResponser$   s    r&   with_streaming_responsez Webhooks.with_streaming_response(   s    ,T22r(   Napi_versionnameextra_headersextra_query
extra_bodytimeouturisubscribed_eventsr-   r.   r/   r0   r1   r2   returnc                   d}	d}
t         }d}|}| j                  |      }|| j                  j                  }||}	n| j	                  |	|
      }	t        j                  |t        j                  ||t        j                  |t        t        j                                       t        j                  |      \  }}| j                  dd|	|
ddddd||t        j                   | j                  j"                  j$                  	      | j                  j&                  fd
d|      }|t         k(  rb| j                  j(                  t         ur| j                  j(                  }n/t        j*                  dt        j,                  dddd      dd      }d}t/        |t        j*                        r|g df}d }t1        | j                  |	xs dddt3        | j                  j&                  t4        j6                        t9        |d            }| j;                  ||d |dk(  |      }|dk7  rm|dk(  rt        j<                  nt        j>                  }tA        tB         |||d| tE        |      | j                  jF                  jI                  d                   S 	  ||      S # tJ        $ rB}t        jL                  | j                  jF                  d   tE        |      ||       Y d}~yd}~ww xY w)!  Creates a new Webhook.

        :param uri: Required. The URI to which webhook events will be sent.
        :param subscribed_events: Required. The events that the webhook is subscribed to.
            Available events:
            - batch.succeeded
            - batch.expired
            - batch.failed
            - interaction.requires_action
            - interaction.completed
            - interaction.failed
            - video.generated
        :param api_version: Which version of the API to use.
        :param name: Optional. The user-provided name of the webhook.
        :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   r4   r-   bodyPOST/{api_version}/webhooksT
user-agentapplication/jsonr-   c                  j    t        j                  j                  dddt        j                         S NFjsonr1   r   serialize_request_bodyr:   r   WebhookInputr1   requests   r&   <lambda>z!Webhooks.create.<locals>.<lambda>x   .    (D(D%%%) r(   methodpathbase_urlurl_variablesrH   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                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       
N4XX*zAPI error occurredrh   defaultr>   F)validatezUnexpected response receivedr   match_responsestream_to_textr   GenAiDefaultErrorr   r   Webhookhttp_reshttp_res_texts     r&   _speakeasy_parse_responsez2Webhooks.create.<locals>._speakeasy_parse_response       ##HeS9 % 4 4X >..((M  ##HeS9 % 4 4X >..((M  ##Hi9KL.$$h  **+I8TTr(    CreateWebhooksyncmode	executionconfigrN   operation_idoauth2_scopessecurity_sourceresponsec                 2    t        j                  ddg|       S Nrk   rh   r   match_status_codescs    r&   rI   z!Webhooks.create.<locals>.<lambda>       5+C+CUENTU+V r(   	streaminghook_ctxrH   is_error_status_codestreamretry_configparsedbuffered_hooksrawparserr}   
client_refr   hooks)'r   _coerce_timeout_mssdk_configurationr[   _get_urlr   CreateWebhookRequestr   rF   r   	unmarshalr   WebhookSubscribedEventr   consume_response_mode_build_requestCreateWebhookGlobalsglobalsr-   rX   r   RetryConfigBackoffStrategy
isinstancer   r   r   Securityr	   
do_requestStreamedAPIResponseAPIResponser   r   r   __dict__get	Exceptionraise_parse_errorr%   r3   r4   r-   r.   r/   r0   r1   r2   rN   rO   retries
server_urlrU   r[   _speakeasy_response_modereqr   rw   _speakeasy_hook_ctxru   _speakeasy_response_cls
parse_exc_rH   s          `               @r&   createzWebhooks.create,   s   > 7<
$,,W5
//::J!!H}}X}=H--#&&"'//%tH,K,K'L#	
 2B1W1W2
. , !!*'"&$(%)* 2%*00 22::FF ++44! #!5 " 
: e%%22%?00==+++))#tQ> !	 gu00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&':;	 	s   J& &	K1/8K,,K1r-   	page_size
page_tokenr/   r0   r2   r   r   c                ^   d}d}t         }	d}
|}| j                  |      }|| j                  j                  }|
|
}n| j	                  ||      }t        j                  |||      }t        j                  |      \  }}| j                  dd|||ddddd||t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|	t         k(  rb| j                  j                  t         ur| j                  j                  }	n/t        j                   dt        j"                  dddd      dd      }	d}t%        |	t        j                         r|	g df}d }t'        | j                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |      }|dk7  rm|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d                  S 	  ||      S # t@        $ rB}t        jB                  | j                  j<                  d   t;        |      ||       Y d}~yd}~ww xY w)   Lists all Webhooks.

        :param api_version: Which version of the API to use.
        :param page_size: Optional. The maximum number of webhooks to return. The service may return fewer than
            this value. If unspecified, at most 50 webhooks will be returned.
            The maximum value is 1000.
        :param page_token: Optional. A page token, received from a previous `ListWebhooks` call.
            Provide this to retrieve the subsequent page.
        :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   r   GETr<   FTr=   r>   r?   rL   rM   rN   rO   rH   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rd   c                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       rj   )r   rp   rq   r   rr   r   r   WebhookListResponsert   s     r&   rw   z0Webhooks.list.<locals>._speakeasy_parse_response"      ##HeS9 % 4 4X >..((M  ##HeS9 % 4 4X >..((M  ##Hi9KL.00(U  **+I8TTr(   ry   ListWebhooksr{   r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   zWebhooks.list.<locals>.<lambda>A  r   r(   r   r   r   r   r   r   )"r   r   r   r[   r   r   ListWebhooksRequestr   r   r   ListWebhooksGlobalsr   r-   rX   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   rN   rO   r   r   rU   r[   rH   r   r   r   rw   r   ru   r   r   s                         r&   listzWebhooks.list   s   , 7<
$,,W5
//::J!!H}}X}=H,,#!
 2B1W1W2
. , !!*'"'$(%)* 2%*// 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu00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&':;	 	s   I! !	J,*8J''J,r-   r/   r0   r2   idc                \   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| j                  j                  t         ur| j                  j                  }n/t        j                   dt        j"                  dddd      dd      }d}t%        |t        j                         r|g df}d }t'        | j                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |      }|dk7  rm|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d                  S 	  ||      S # t@        $ rB}t        jB                  | j                  j<                  d   t;        |      ||       Y d}~yd}~ww xY w)   Gets a specific Webhook.

        :param id: Required. The ID of the webhook to retrieve.
        :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   r   /{api_version}/webhooks/{id}FTr=   r>   r?   r   r\   r]   r^   r_   r`   ra   rb   rd   c                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       rj   ro   rt   s     r&   rw   z/Webhooks.get.<locals>._speakeasy_parse_response  rx   r(   ry   
GetWebhookr{   r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   zWebhooks.get.<locals>.<lambda>  r   r(   r   r   r   r   r   r   )"r   r   r   r[   r   r   GetWebhookRequestr   r   r   GetWebhookGlobalsr   r-   rX   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   rN   rO   r   r   rU   r[   rH   r   r   r   rw   r   ru   r   r   s                        r&   r   zWebhooks.get`  s   " 7<
$,,W5
//::J!!H}}X}=H**#

 2B1W1W2
. , !!/'"'$(%)* 2%*-- 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu00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+)8J&&J+
r-   update_maskr.   r3   r4   stater/   r0   r1   r2   r   r   c       
           
 d}d}t         }d}|}| j                  |      }|| j                  j                  }||}n| j	                  ||      }t        j                  |||t        j                  ||t        j                  |t        t        t        j                              |            t        j                  |      \  }}| j!                  dd||ddddd	||	t        j"                  | j                  j$                  j&                  
      | j                  j(                  
fdd|      }|t         k(  rb| j                  j*                  t         ur| j                  j*                  }n/t        j,                  dt        j.                  dddd      dd      }d}t1        |t        j,                        r|g df}d }t3        | j                  |xs dddt5        | j                  j(                  t6        j8                        t;        |d            }| j=                  ||d |dk(  |      }|dk7  rm|dk(  rt        j>                  nt        j@                  }tC        tD         |||d| tG        |      | j                  jH                  jK                  d       !            S 	  ||      S # tL        $ rB}t        jN                  | j                  jH                  d    tG        |      ||       Y d}~yd}~ww xY w)"g  Updates an existing Webhook.

        :param id: Required. The ID of the webhook to update.
        :param api_version: Which version of the API to use.
        :param update_mask: Optional. The list of fields to update.
        :param name: Optional. The user-provided name of the webhook.
        :param uri: Optional. The URI to which webhook events will be sent.
        :param subscribed_events: Optional. The events that the webhook is subscribed to.
            Available events:
            - batch.succeeded
            - batch.expired
            - batch.failed
            - interaction.requires_action
            - interaction.completed
            - interaction.failed
            - video.generated
        :param state: Optional. The state of the webhook.
        :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   r4   r   r-   r   r   r:   PATCHr   FTr=   r>   r?   c                      t        j                  j                  nd dddt        t        j
                            S NFTrB   rC   r   rE   r:   r   r   WebhookUpdaterG   s   r&   rI   z!Webhooks.update.<locals>.<lambda>A  :    (D(D ' 3//0%) r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       rj   ro   rt   s     r&   rw   z2Webhooks.update.<locals>._speakeasy_parse_response\  rx   r(   ry   UpdateWebhookr{   r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z!Webhooks.update.<locals>.<lambda>{  r   r(   r   r   r   r   r   r   )(r   r   r   r[   r   r   UpdateWebhookRequestr   r   r   r   r   r   WebhookUpdateSubscribedEventr   r   r   UpdateWebhookGlobalsr   r-   rX   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r%   r   r-   r   r.   r3   r4   r   r/   r0   r1   r2   rN   rO   r   r   rU   r[   r   r   r   rw   r   ru   r   r   rH   s             `               @r&   updatezWebhooks.update  s   N 7<
$,,W5
//::J!!H}}X}=H--##''"'//%T("G"GHI# 	
 2B1W1W2
. , !!/'"'$(%)* 2%*00 22::FF ++44! #!5 " 
: e%%22%?00==+++))#tQ> !	 gu00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&':;	 	s   (J0 0	K;98K66K;c                \   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| j                  j                  t         ur| j                  j                  }n/t        j                   dt        j"                  dddd      dd      }d}t%        |t        j                         r|g df}d }t'        | j                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |      }|dk7  rm|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d                  S 	  ||      S # t@        $ rB}t        jB                  | j                  j<                  d   t;        |      ||       Y d}~yd}~ww xY w)   Deletes a Webhook.

        :param id: Required. The ID of the webhook to delete.
            Format: `{webhook_id}`
        :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   DELETEr   FTr=   r>   r?   r   r\   r]   r^   r_   r`   ra   rb   rd   c                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       rj   )r   rp   rq   r   rr   r   r   Emptyrt   s     r&   rw   z2Webhooks.delete.<locals>._speakeasy_parse_response  s    ##HeS9 % 4 4X >..((M  ##HeS9 % 4 4X >..((M  ##Hi9KL. &&5  **+I8TTr(   ry   DeleteWebhookr{   r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z!Webhooks.delete.<locals>.<lambda>  r   r(   r   r   r   r   r   r   )"r   r   r   r[   r   r   DeleteWebhookRequestr   r   r   DeleteWebhookGlobalsr   r-   rX   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r   s                        r&   deletezWebhooks.delete  s   $ 7<
$,,W5
//::J!!H}}X}=H--#

 2B1W1W2
. , !!/'"'$(%)* 2%*00 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu00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&':;	 	r   r-   revocation_behaviorr/   r0   r1   r2   r   c                   d}d}	t         }
d}|}| j                  |      }|| j                  j                  }||}n| j	                  ||	      }t        j                  ||t        j                  |            t        j                  |      \  }}| j                  dd||	ddddd	||t        j                  | j                  j                  j                  
      | j                  j                  fdd|      }|
t         k(  rb| j                  j                  t         ur| j                  j                  }
n/t!        j"                  dt!        j$                  dddd      dd      }
d}t'        |
t         j"                        r|
g df}d }t)        | j                  |xs dddt+        | j                  j                  t,        j.                        t1        |d            }| j3                  ||d |dk(  |      }|dk7  rm|dk(  rt        j4                  nt        j6                  }t9        t:         |||d| t=        |      | j                  j>                  jA                  d       !            S 	  ||      S # tB        $ rB}t        jD                  | j                  j>                  d    t=        |      ||       Y d}~yd}~ww xY w)"  Generates a new signing secret for a Webhook.

        :param id: Required. The ID of the webhook for which to generate a signing secret.
            Format: `{webhook_id}`
        :param api_version: Which version of the API to use.
        :param revocation_behavior: Optional. The revocation behavior for previous signing secrets.
        :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   r-   r   r:   r;   0/{api_version}/webhooks/{id}:rotateSigningSecretFTr=   r>   r?   c                      t        j                  j                  nd dddt        t        j
                            S r   r   rE   r:   r   r   RotateSigningSecretRequestrG   s   r&   rI   z0Webhooks.rotate_signing_secret.<locals>.<lambda>f  :    (D(D ' 3<<=%) r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       rj   )r   rp   rq   r   rr   r   r   "WebhookRotateSigningSecretResponsert   s     r&   rw   zAWebhooks.rotate_signing_secret.<locals>._speakeasy_parse_response  s    ##HeS9 % 4 4X >..((M  ##HeS9 % 4 4X >..((M  ##Hi9KL.??"  **+I8TTr(   ry   RotateSigningSecretr{   r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z0Webhooks.rotate_signing_secret.<locals>.<lambda>  r   r(   r   r   r   r   r   r   )#r   r   r   r[   r   r   r   r   r   r   r   RotateSigningSecretGlobalsr   r-   rX   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   r1   r2   rN   rO   r   r   rU   r[   r   r   r   rw   r   ru   r   r   rH   s         `               @r&   rotate_signing_secretzWebhooks.rotate_signing_secret$  s   0 7<
$,,W5
//::J!!H}}X}=H33#44$7
 2B1W1W2
. , !!C'"'$(%)* 2%*66 22::FF ++44! #!5 " 
: e%%22%?00==+++))#tQ> !	 gu00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&':;	 	s   4I< <	K8KKr-   r:   r/   r0   r1   r2   r:   c                   d}d}	t         }
d}|}| j                  |      }|| j                  j                  }||}n| j	                  ||	      }t        j                  ||t        j                  |t        t        j                                 t        j                  |      \  }}| j                  dd||	ddddd||t        j                  | j                  j                  j                   	      | j                  j"                  fd
d|      }|
t         k(  rb| j                  j$                  t         ur| j                  j$                  }
n/t        j&                  dt        j(                  dddd      dd      }
d}t+        |
t        j&                        r|
g df}d }t-        | j                  |xs dddt/        | j                  j"                  t0        j2                        t5        |d            }| j7                  ||d |dk(  |      }|dk7  rm|dk(  rt        j8                  nt        j:                  }t=        t>         |||d| tA        |      | j                  jB                  jE                  d                   S 	  ||      S # tF        $ rB}t        jH                  | j                  jB                  d   tA        |      ||       Y d}~yd}~ww xY w)!I  Sends a ping event to a Webhook.

        :param id: Required. The ID of the webhook to ping.
            Format: `{webhook_id}`
        :param api_version: Which version of the API to use.
        :param body: The request body.
        :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
        Nr   r;   !/{api_version}/webhooks/{id}:pingFTr=   r>   r?   c                      t        j                  j                  nd dddt        t        j
                            S r   r   rE   r:   r   r   PingWebhookRequestrG   s   r&   rI   zWebhooks.ping.<locals>.<lambda>  :    (D(D ' 3445%) r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                    t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      r,t        j                  |       }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       rj   )r   rp   rq   r   rr   r   r   WebhookPingResponsert   s     r&   rw   z0Webhooks.ping.<locals>._speakeasy_parse_response  r   r(   ry   PingWebhookr{   r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   zWebhooks.ping.<locals>.<lambda>>  r   r(   r   r   r   r   r   r   )%r   r   r   r[   r   r   r  r   get_pydantic_modelr   r   r   r   r   PingWebhookGlobalsr   r-   rX   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   r1   r2   rN   rO   r   r   rU   r[   r   r   r   rw   r   ru   r   r   rH   s         `               @r&   pingzWebhooks.ping  s   6 7<
$,,W5
//::J!!H}}X}=H++#))$9T9T0UV
 2B1W1W2
. , !!4'"'$(%)* 2%*.. 22::FF ++44! #!5 " 
: e%%22%?00==+++))#tQ> !	 gu00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&':;	 	s   	J 	K8KK(__name__
__module____qualname__propertyr'   r+   strr   webhooks_webhookr   r   r   r   r   floathttpxTimeoutr   rs   r   intr   r   r   webhooks_webhookupdater   WebhookUpdateStater   r   r   r   #webhooks_rotatesigningsecretrequestRevocationBehaviorr  r  webhooks_pingwebhookrequestr  PingWebhookRequestParamr  r   r(   r&   r    r    #   s   - - 3 3 &*"5937269=c c $$4$K$KL	c
 c]c smc  S 12c gc3h/0c WS#X./c %u}} 456c 
		cP &*#'$(59379=M c]M C=	M
 SMM  S 12M gc3h/0M %u}} 456M 
	%	%Mf &*59379=GG c]	G
  S 12G gc3h/0G %u}} 456G 
		GZ &*%)"! EI5937269=oo c]	o
 c]o smo c]o $+HHI
o .AABo  S 12o gc3h/0o WS#X./o %u}} 456o  
		!oj &*59379=HH c]	H
  S 12H gc3h/0H %u}} 456H 
		H\ &* 5937269=[[ c]	[
 &/BB
[  S 12[ gc3h/0[ WS#X./[ %u}} 456[ 
	4	4[B &* 5937269=ZZ c]	Z
 +>>+CCE
Z  S 12Z gc3h/0Z WS#X./Z %u}} 456Z 
	%	%Zr(   r    c                       e Zd ZdeddfdZy)r#   sdkr5   Nc                    || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _	        y Nr/   )
_sdkr   to_raw_response_wrapperr   r   r   r   r   r  r  r%   r*  s     r&   __init__z WebhooksWithRawResponse.__init___  s    	&>>JJ
 %<<SXXW	#;;CGG_U&>>JJ
 '>>JJ
 &6%M%M%%&
" %<<SXXW	r(   r  r  r  r    r0  r(  r(   r&   r#   r#   ^  s    XH X Xr(   r#   c                       e Zd ZdeddfdZy)r*   r*  r5   Nc                    || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _	        y r,  )
r-  r   to_streamed_response_wrapperr   r   r   r   r   r  r  r/  s     r&   r0  z&WebhooksWithStreamingResponse.__init__s  s    	&CCJJ
 %AAHHo
	 $@@GG_
 'CCJJ
 'CCJJ
 &6%R%R%%&
" %AAHHo
	r(   r1  r(  r(   r&   r*   r*   r  s    
H 
 
r(   r*   c                   P   e Zd Zed        Zed        Zddddddddedeej                     de
e   de
e   d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dej$                  fdZdddddddde
e   de
e   de
e   d	e
eeef      d
e
eeef      de
eeej                   f      dej*                  fdZddddddede
e   d	e
eeef      d
e
eeef      de
eeej                   f      dej$                  fdZddddddddddd
dede
e   de
e   de
e   de
e   de
eej2                        de
ej4                     d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dej$                  fdZddddddede
e   d	e
eeef      d
e
eeef      de
eeej                   f      dej:                  fdZddddddddede
e   de
ej@                     d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dejB                  fdZ"ddddddddede
e   de
ee#jH                  e#jJ                  f      d	e
eeef      d
e
eeef      de
eeef      de
eeej                   f      dejL                  fd Z'y)!AsyncWebhooksc                     t        |       S r"   )AsyncWebhooksWithRawResponser$   s    r&   r'   zAsyncWebhooks.with_raw_response  s    +D11r(   c                     t        |       S r"   )"AsyncWebhooksWithStreamingResponser$   s    r&   r+   z%AsyncWebhooks.with_streaming_response  s    1$77r(   Nr,   r3   r4   r-   r.   r/   r0   r1   r2   r5   c                  K   d}	d}
t         }d}|}| j                  |      }|| j                  j                  }||}	n| j	                  |	|
      }	t        j                  |t        j                  ||t        j                  |t        t        j                                       t        j                  |      \  }}| j                  dd|	|
ddddd||t        j                   | j                  j"                  j$                  	      | j                  j&                  fd
d|      }|t         k(  rb| j                  j(                  t         ur| j                  j(                  }n/t        j*                  dt        j,                  dddd      dd      }d}t/        |t        j*                        r|g df}d }t1        | j                  |	xs dddt3        | j                  j&                  t4        j6                        t9        |d            }| j;                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j<                  nt        j>                  }tA        tB         |||d| tE        |      | j                  jF                  jI                  d      | j                  jF                  jI                  d       !            S 	  ||       d{   S 7 7 # tJ        $ r{}t        jL                  | j                  jF                  jI                  d       | j                  jF                  jI                  d      tE        |      ||       d{  7   Y d}~yd}~ww xY ww)"r7   Nr8   r9   r;   r<   Tr=   r>   r?   c                  j    t        j                  j                  dddt        j                         S rA   rD   rG   s   r&   rI   z&AsyncWebhooks.create.<locals>.<lambda>  rJ   r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   r   rp   stream_to_text_asyncr   rr   r   r   rs   rt   s     r&   rw   z7AsyncWebhooks.create.<locals>._speakeasy_parse_response       ##HeS9&+&@&@&J J..((M  ##HeS9&+&@&@&J J..((M  ##Hi9KL.$$h  **+I8TT !K
 !K#   0C&C"A
C&=C$>A%C&$C&ry   rz   asyncr|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z&AsyncWebhooks.create.<locals>.<lambda>  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   rF   r   r   r   r   r   r   _build_request_asyncr   r   r-   rX   r   r   r   r   r   r   r   r   r	   do_request_asyncAsyncStreamedAPIResponseAsyncAPIResponser   r   r   r   r   r   raise_parse_error_asyncr   s          `               @r&   r   zAsyncWebhooks.create  sX    > 7<
$,,W5
//::J!!H}}X}=H--#&&"'//%tH,K,K'L#	
 2B1W1W2
. , ''*'"&$(%)* 2%*00 22::FF ++44! #!5 ( 
: e%%22%?00==+++))#tQ> !	 gu00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=&':;  	s\   H,M'0K1BM'K  KK  M'K   	M$)A+MMMM'M$$M'r   r   r   c                H  K   d}d}t         }	d}
|}| j                  |      }|| j                  j                  }|
|
}n| j	                  ||      }t        j                  |||      }t        j                  |      \  }}| j                  dd|||ddddd||t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|	t         k(  rb| j                  j                  t         ur| j                  j                  }	n/t        j                   dt        j"                  dddd      dd      }	d}t%        |	t        j                         r|	g df}d }t'        | j                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d      | j                  j<                  j?                  d                   S 	  ||       d{   S 7 7 # t@        $ r{}t        jB                  | j                  j<                  j?                  d      | j                  j<                  j?                  d      t;        |      ||       d{  7   Y d}~yd}~ww xY ww)!r   Nr   r   r<   FTr=   r>   r?   r   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   )r   rp   r?  r   rr   r   r   r   rt   s     r&   rw   z5AsyncWebhooks.list.<locals>._speakeasy_parse_response       ##HeS9&+&@&@&J J..((M  ##HeS9&+&@&@&J J..((M  ##Hi9KL.00(U  **+I8TT !K
 !KrA  ry   r   rB  r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z$AsyncWebhooks.list.<locals>.<lambda>  r   r(   r   r   r   r   r   rD  rE  )"r   r   r   r[   r   r   r   r   r   rG  r   r   r-   rX   r   r   r   r   r   r   r   r   r   r	   rH  rI  rJ  r   r   r   r   r   r   rK  r   s                         r&   r   zAsyncWebhooks.list<  s&    , 7<
$,,W5
//::J!!H}}X}=H,,#!
 2B1W1W2
. , ''*'"'$(%)* 2%*// 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu00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=&':;  	s\   G)L"+J,BL"J JJ L"J 	L$A+LLLL"LL"r   r   c                F  K   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| j                  j                  t         ur| j                  j                  }n/t        j                   dt        j"                  dddd      dd      }d}t%        |t        j                         r|g df}d }t'        | j                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d      | j                  j<                  j?                  d                   S 	  ||       d{   S 7 7 # t@        $ r{}t        jB                  | j                  j<                  j?                  d      | j                  j<                  j?                  d      t;        |      ||       d{  7   Y d}~yd}~ww xY ww)!r   Nr   r   r   FTr=   r>   r?   r   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   r>  rt   s     r&   rw   z4AsyncWebhooks.get.<locals>._speakeasy_parse_response  r@  rA  ry   r   rB  r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z#AsyncWebhooks.get.<locals>.<lambda>7  r   r(   r   r   r   r   r   rD  rE  )"r   r   r   r[   r   r   r   r   r   rG  r   r   r-   rX   r   r   r   r   r   r   r   r   r   r	   rH  rI  rJ  r   r   r   r   r   r   rK  r   s                        r&   r   zAsyncWebhooks.get  s#    " 7<
$,,W5
//::J!!H}}X}=H**#

 2B1W1W2
. , ''/'"'$(%)* 2%*-- 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu00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!r   r   r   c       
           
K   d}d}t         }d}|}| j                  |      }|| j                  j                  }||}n| j	                  ||      }t        j                  |||t        j                  ||t        j                  |t        t        t        j                              |            t        j                  |      \  }}| j!                  dd||ddddd	||	t        j"                  | j                  j$                  j&                  
      | j                  j(                  
fdd|      }|t         k(  rb| j                  j*                  t         ur| j                  j*                  }n/t        j,                  dt        j.                  dddd      dd      }d}t1        |t        j,                        r|g df}d }t3        | j                  |xs dddt5        | j                  j(                  t6        j8                        t;        |d            }| j=                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j>                  nt        j@                  }tC        tD         |||d| tG        |      | j                  jH                  jK                  d       | j                  jH                  jK                  d!      "            S 	  ||       d{   S 7 7 # tL        $ r{}t        jN                  | j                  jH                  jK                  d!      | j                  jH                  jK                  d       tG        |      ||       d{  7   Y d}~yd}~ww xY ww)#r   Nr   r   r   r   FTr=   r>   r?   c                      t        j                  j                  nd dddt        t        j
                            S r   r   rG   s   r&   rI   z&AsyncWebhooks.update.<locals>.<lambda>  r   r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   r>  rt   s     r&   rw   z7AsyncWebhooks.update.<locals>._speakeasy_parse_response  r@  rA  ry   r   rB  r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z&AsyncWebhooks.update.<locals>.<lambda>  r   r(   r   r   r   r   r   rD  rE  )(r   r   r   r[   r   r   r   r   r   r   r   r   r   r   r   r   rG  r   r   r-   rX   r   r   r   r   r   r   r   r   r	   rH  rI  rJ  r   r   r   r   r   r   rK  r   s             `               @r&   r   zAsyncWebhooks.updateX  sj    N 7<
$,,W5
//::J!!H}}X}=H--##''"'//%T("G"GHI# 	
 2B1W1W2
. , ''/'"'$(%)* 2%*00 22::FF ++44! #!5 ( 
: e%%22%?00==+++))#tQ> !	 gu00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=&':;  	s\   H6M1:K&;BM1K* !K("K* %M1(K* *	M.3A+M)M!M)$M1)M..M1c                F  K   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| j                  j                  t         ur| j                  j                  }n/t        j                   dt        j"                  dddd      dd      }d}t%        |t        j                         r|g df}d }t'        | j                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d      | j                  j<                  j?                  d                   S 	  ||       d{   S 7 7 # t@        $ r{}t        jB                  | j                  j<                  j?                  d      | j                  j<                  j?                  d      t;        |      ||       d{  7   Y d}~yd}~ww xY ww)!r   Nr   r   r   FTr=   r>   r?   r   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   )r   rp   r?  r   rr   r   r   r   rt   s     r&   rw   z7AsyncWebhooks.delete.<locals>._speakeasy_parse_responseW  s     ##HeS9&+&@&@&J J..((M  ##HeS9&+&@&@&J J..((M  ##Hi9KL. &&5  **+I8TT !K
 !KrA  ry   r   rB  r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z&AsyncWebhooks.delete.<locals>.<lambda>v  r   r(   r   r   r   r   r   rD  rE  )"r   r   r   r[   r   r   r   r   r   rG  r   r   r-   rX   r   r   r   r   r   r   r   r   r   r	   rH  rI  rJ  r   r   r   r   r   r   rK  r   s                        r&   r   zAsyncWebhooks.delete  s#    $ 7<
$,,W5
//::J!!H}}X}=H--#

 2B1W1W2
. , ''/'"'$(%)* 2%*00 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu00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=&':;  	rS  r   r   c                ~  K   d}d}	t         }
d}|}| j                  |      }|| j                  j                  }||}n| j	                  ||	      }t        j                  ||t        j                  |            t        j                  |      \  }}| j                  dd||	ddddd	||t        j                  | j                  j                  j                  
      | j                  j                  fdd|      }|
t         k(  rb| j                  j                  t         ur| j                  j                  }
n/t!        j"                  dt!        j$                  dddd      dd      }
d}t'        |
t         j"                        r|
g df}d }t)        | j                  |xs dddt+        | j                  j                  t,        j.                        t1        |d            }| j3                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j4                  nt        j6                  }t9        t:         |||d| t=        |      | j                  j>                  jA                  d       | j                  j>                  jA                  d!      "            S 	  ||       d{   S 7 7 # tB        $ r{}t        jD                  | j                  j>                  jA                  d!      | j                  j>                  jA                  d       t=        |      ||       d{  7   Y d}~yd}~ww xY ww)#r   Nr   r   r;   r   FTr=   r>   r?   c                      t        j                  j                  nd dddt        t        j
                            S r   r   rG   s   r&   rI   z5AsyncWebhooks.rotate_signing_secret.<locals>.<lambda>  r   r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   )r   rp   r?  r   rr   r   r   r  rt   s     r&   rw   zFAsyncWebhooks.rotate_signing_secret.<locals>._speakeasy_parse_response  s     ##HeS9&+&@&@&J J..((M  ##HeS9&+&@&@&J J..((M  ##Hi9KL.??"  **+I8TT! !K
 !KrA  ry   r  rB  r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z5AsyncWebhooks.rotate_signing_secret.<locals>.<lambda>  r   r(   r   r   r   r   r   rD  rE  )#r   r   r   r[   r   r   r   r   r   r   rG  r  r   r-   rX   r   r   r   r   r   r   r   r   r   r	   rH  rI  rJ  r   r   r   r   r   r   rK  r  s         `               @r&   r  z#AsyncWebhooks.rotate_signing_secret  s<    0 7<
$,,W5
//::J!!H}}X}=H33#44$7
 2B1W1W2
. , ''C'"'$(%)* 2%*66 22::FF ++44! #!5 ( 
: e%%22%?00==+++))#tQ> !	 gu00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=&':;  	s\   HL=J2BL="J6 -J4.J6 1L=4J6 6	L:?A+L5*L-+L50L=5L::L=r  r:   c                  K   d}d}	t         }
d}|}| j                  |      }|| j                  j                  }||}n| j	                  ||	      }t        j                  ||t        j                  |t        t        j                                 t        j                  |      \  }}| j                  dd||	ddddd||t        j                  | j                  j                  j                   	      | j                  j"                  fd
d|      }|
t         k(  rb| j                  j$                  t         ur| j                  j$                  }
n/t        j&                  dt        j(                  dddd      dd      }
d}t+        |
t        j&                        r|
g df}d }t-        | j                  |xs dddt/        | j                  j"                  t0        j2                        t5        |d            }| j7                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j8                  nt        j:                  }t=        t>         |||d| tA        |      | j                  jB                  jE                  d      | j                  jB                  jE                  d       !            S 	  ||       d{   S 7 7 # tF        $ r{}t        jH                  | j                  jB                  jE                  d       | j                  jB                  jE                  d      tA        |      ||       d{  7   Y d}~yd}~ww xY ww)"r	  Nr   r;   r
  FTr=   r>   r?   c                      t        j                  j                  nd dddt        t        j
                            S r   r  rG   s   r&   rI   z$AsyncWebhooks.ping.<locals>.<lambda>y  r  r(   rK   r\   r]   r^   r_   r`   ra   rb   rd   c                   K   t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      r4t        j                  |        d {   }t        j                  d| |      t        j                  | dd      rt        t        j                  | d      S t        j                  d	|       7 7 fwrj   )r   rp   r?  r   rr   r   r   r  rt   s     r&   rw   z5AsyncWebhooks.ping.<locals>._speakeasy_parse_response  rN  rA  ry   r  rB  r|   r   c                 2    t        j                  ddg|       S r   r   r   s    r&   rI   z$AsyncWebhooks.ping.<locals>.<lambda>  r   r(   r   r   r   r   r   rD  rE  )%r   r   r   r[   r   r   r  r   r  r   r   r   r   rG  r  r   r-   rX   r   r   r   r   r   r   r   r   r	   rH  rI  rJ  r   r   r   r   r   r   rK  r  s         `               @r&   r  zAsyncWebhooks.ping6  sF    6 7<
$,,W5
//::J!!H}}X}=H++#))$9T9T0UV
 2B1W1W2
. , ''4'"'$(%)* 2%*.. 22::FF ++44! #!5 ( 
: e%%22%?00==+++))#tQ> !	 gu00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=&':;  	s\   HMKBM7K K	K M	K 	MA+M
?M M
M
MMr  r(  r(   r&   r6  r6    s   2 2 8 8 &*"5937269=e e $$4$K$KL	e
 c]e sme  S 12e gc3h/0e WS#X./e %u}} 456e 
		eT &*#'$(59379=O c]O C=	O
 SMO  S 12O gc3h/0O %u}} 456O 
	%	%Oj &*59379=II c]	I
  S 12I gc3h/0I %u}} 456I 
		I^ &*%)"! EI5937269=qq c]	q
 c]q smq c]q $+HHI
q .AABq  S 12q gc3h/0q WS#X./q %u}} 456q  
		!qn &*59379=JJ c]	J
  S 12J gc3h/0J %u}} 456J 
		J` &* 5937269=]] c]	]
 &/BB
]  S 12] gc3h/0] WS#X./] %u}} 456] 
	4	4]F &* 5937269=\\ c]	\
 +>>+CCE
\  S 12\ gc3h/0\ WS#X./\ %u}} 456\ 
	%	%\r(   r6  c                       e Zd ZdeddfdZy)r8  r*  r5   Nc                    || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _	        y r,  )
r-  r   async_to_raw_response_wrapperr   r   r   r   r   r  r  r/  s     r&   r0  z%AsyncWebhooksWithRawResponse.__init__  s    	&DDJJ
 %BBHHo
	 $AAGG_
 'DDJJ
 'DDJJ
 &6%S%S%%&
" %BBHHo
	r(   r  r  r  r6  r0  r(  r(   r&   r8  r8    s    
M 
d 
r(   r8  c                       e Zd ZdeddfdZy)r:  r*  r5   Nc                    || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j                  d      | _	        y r,  )
r-  r   "async_to_streamed_response_wrapperr   r   r   r   r   r  r  r/  s     r&   r0  z+AsyncWebhooksWithStreamingResponse.__init__  s    	&IIJJ
 %GGHHo
	 $FFGG_
 'IIJJ
 'IIJJ
 ??))? 	"
 %GGHHo
	r(   rf  r(  r(   r&   r:  r:    s    
M 
d 
r(   r:  )-__doc__ry   r   r   r   r   r   r   r   r	   basesdkr
   r   r   r   r   r   types.webhooksr   r&  r   r$  r   r  r   r"  r   r   utils.unmarshal_json_responser   r  typingr   r   r   r   r   r   r   r    r#   r*   r6  r8  r:  r(  r(   r&   <module>ro     s   " H * * H H * B B  ; B  F F Fxw xv!X X(
 
4FL FR"
 
4
 
r(   