
    pi3                         d Z ddlmZmZmZmZmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ ddlmZ  G d d	e      Z G d
 de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Conversations
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictListOptionalUnion)	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       e Zd Z G d de      Z G d de      Z	 dedeee	f   f fdZ
edd	       Zdd
ZddZej                   ej                   ej                   ej                   ej                   fdeeef   deee   ef   deeef   deeef   dedef   dd fdZej                   ej                   ej                   ej                   ej                   fdeeef   deee   ef   deeef   deeef   dedef   dd fdZdefdZ xZS )WebhookInstancec                       e Zd ZdZdZy)WebhookInstance.MethodGETPOSTN)__name__
__module____qualname__r   r        t/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/conversations/v1/configuration/webhook.pyMethodr      s    r   r   c                       e Zd ZdZdZy)WebhookInstance.TargetwebhookflexN)r   r   r   WEBHOOKFLEXr   r   r   Targetr      s    r   r!   versionpayloadc                 f   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        d | _
        y )Naccount_sidmethodfilterspre_webhook_urlpost_webhook_urltargeturl)super__init__getr%   r&   r'   r(   r)   r*   r+   _context)selfr"   r#   	__class__s      r   r-   zWebhookInstance.__init__+   s    !*1++m*D:A++h:O,3KK	,B.5kk:K.L/6{{;M/N:A++h:O")++e"426r   returnc                 f    | j                   t        | j                        | _         | j                   S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: WebhookContext for this WebhookInstance
        )r/   WebhookContext_versionr0   s    r   _proxyzWebhookInstance._proxy8   s-     == *DM }}r   c                 6    | j                   j                         S )[
        Fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        )r7   fetchr6   s    r   r:   zWebhookInstance.fetchF   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        N)r7   fetch_asyncr6   s    r   r=   zWebhookInstance.fetch_asyncO   s!      [[,,....s   '%'r&   r'   r(   r)   r*   r   c                 B    | j                   j                  |||||      S )  
        Update the WebhookInstance

        :param method: The HTTP method to be used when sending a webhook request.
        :param filters: The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onMessageAdd`, `onMessageUpdate`, `onMessageRemove`, `onConversationUpdated`, `onConversationRemoved`, `onConversationAdd`, `onConversationAdded`, `onConversationRemove`, `onConversationUpdate`, `onConversationStateUpdated`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onParticipantAdd`, `onParticipantRemove`, `onParticipantUpdate`, `onDeliveryUpdated`, `onUserAdded`, `onUserUpdate`, `onUserUpdated`
        :param pre_webhook_url: The absolute url the pre-event webhook request should be sent to.
        :param post_webhook_url: The absolute url the post-event webhook request should be sent to.
        :param target:

        :returns: The updated WebhookInstance
        r&   r'   r(   r)   r*   )r7   updater0   r&   r'   r(   r)   r*   s         r   rA   zWebhookInstance.updateX   s/    & {{!!+- " 
 	
r   c                 ^   K   | j                   j                  |||||       d{   S 7 w)  
        Asynchronous coroutine to update the WebhookInstance

        :param method: The HTTP method to be used when sending a webhook request.
        :param filters: The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onMessageAdd`, `onMessageUpdate`, `onMessageRemove`, `onConversationUpdated`, `onConversationRemoved`, `onConversationAdd`, `onConversationAdded`, `onConversationRemove`, `onConversationUpdate`, `onConversationStateUpdated`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onParticipantAdd`, `onParticipantRemove`, `onParticipantUpdate`, `onDeliveryUpdated`, `onUserAdded`, `onUserUpdate`, `onUserUpdated`
        :param pre_webhook_url: The absolute url the pre-event webhook request should be sent to.
        :param post_webhook_url: The absolute url the post-event webhook request should be sent to.
        :param target:

        :returns: The updated WebhookInstance
        r@   N)r7   update_asyncrB   s         r   rE   zWebhookInstance.update_asyncs   s=     & [[--+- . 
 
 	
 
s   $-+-c                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z)<Twilio.Conversations.V1.WebhookInstance>r   r6   s    r   __repr__zWebhookInstance.__repr__   s     ;r   )r2   r4   )r2   r   )r   r   r   objectr   r!   r   r   strr   r-   propertyr7   r:   r=   r	   unsetr   r   rA   rE   rH   __classcell__r1   s   @r   r   r      s     7 7$sCx. 7  #/ &,\\,2LL.4ll/5||:@,,
c6k"
 tCy&()
 sF{+	

  V,
 .67
 

: &,\\,2LL.4ll/5||:@,,
c6k"
 tCy&()
 sF{+	

  V,
 .67
 

6;# ;r   r   c                       e Zd Zdef fdZdefdZdefdZej                  ej                  ej                  ej                  ej                  fde
eef   de
ee   ef   de
eef   d	e
eef   d
e
def   defdZej                  ej                  ej                  ej                  ej                  fde
eef   de
ee   ef   de
eef   d	e
eef   d
e
def   defdZdefdZ xZS )r4   r"   c                 2    t         |   |       d| _        y)zk
        Initialize the WebhookContext

        :param version: Version that contains the resource
        z/Configuration/WebhooksN)r,   r-   _urir0   r"   r1   s     r   r-   zWebhookContext.__init__   s     	!-	r   r2   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  |      S )r9   application/jsonAcceptr   r&   uriheaders)r	   ofr5   r:   rQ   r   r0   rX   r#   s      r   r:   zWebhookContext.fetch   sQ     ))B-.--%%U		7%SMM
 	
r   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  |      S 7 w)r<   rT   rU   r   rV   N)r	   rY   r5   r=   rQ   r   rZ   s      r   r=   zWebhookContext.fetch_async   sf      ))B-.11dii 2 
 
 MM
 	
	
s   AA%A#	A%r&   r'   r(   r)   r*   r   c                    t        j                  |t        j                  |d       |||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )	r?   c                     | S Nr   es    r   <lambda>z'WebhookContext.update.<locals>.<lambda>       A r   r   FiltersPreWebhookUrlPostWebhookUrlr!   !application/x-www-form-urlencodedContent-TyperT   rU   r   r&   rW   datarX   )r	   rY   r   mapr5   rA   rQ   r   	r0   r&   r'   r(   r)   r*   rj   rX   r#   s	            r   rA   zWebhookContext.update   s    ( yy $==+>!0"2 
 ))B-"E.--&&tyytW ' 
 t}}g66r   c                 :  K   t        j                  |t        j                  |d       |||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d	{   }t        | j                  |      S 7 w)
rD   c                     | S r^   r   r_   s    r   ra   z-WebhookContext.update_async.<locals>.<lambda>  rb   r   rc   rg   rh   rT   rU   r   ri   N)r	   rY   r   rk   r5   rE   rQ   r   rl   s	            r   rE   zWebhookContext.update_async   s     ( yy $==+>!0"2 
 ))B-"E.22tyytW 3 
 
 t}}g66	
s   A<B>B?Bc                      y)rG   z(<Twilio.Conversations.V1.WebhookContext>r   r6   s    r   rH   zWebhookContext.__repr__  s     :r   )r   r   r   r   r-   r   r:   r=   r	   rL   r   rJ   rI   r   rA   rE   rH   rM   rN   s   @r   r4   r4      se   . .
 
&
? 
. &,\\,2LL.4ll/5||:@,,'7c6k"'7 tCy&()'7 sF{+	'7
  V,'7 .67'7 
'7V &,\\,2LL.4ll/5||:@,,'7c6k"'7 tCy&()'7 sF{+	'7
  V,'7 .67'7 
'7R:# :r   r4   c                   H     e Zd Zdef fdZdefdZdefdZdefdZ	 xZ
S )WebhookListr"   c                 $    t         |   |       y)zi
        Initialize the WebhookList

        :param version: Version that contains the resource

        N)r,   r-   rR   s     r   r-   zWebhookList.__init__*  s     	!r   r2   c                 ,    t        | j                        S z.
        Constructs a WebhookContext

        r4   r5   r6   s    r   r.   zWebhookList.get3      
 dmm,,r   c                 ,    t        | j                        S rt   ru   r6   s    r   __call__zWebhookList.__call__:  rv   r   c                      y)rG   z%<Twilio.Conversations.V1.WebhookList>r   r6   s    r   rH   zWebhookList.__repr__A  s     7r   )r   r   r   r   r-   r4   r.   rx   rJ   rH   rM   rN   s   @r   rq   rq   (  s3    " "-^ --. -7# 7r   rq   N)__doc__typingr   r   r   r   r   twilio.baser   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r4   rq   r   r   r   <module>r      sL    4 3 ) 8 : 2 '~;& ~;BM:_ M:`7, 7r   