U
    ^g%i3  ã                   @   s”   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	„ d	eƒZG d
d„ deƒZG dd„ deƒZdS )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                       s<  e Zd ZG dd„ deƒZG dd„ deƒZeeee	f dœ‡ fdd„Z
edd	œd
d„ƒZd d	œdd„Zd d	œdd„Zejejejejejfeeef eee ef eeef eeef edef d dœdd„Zejejejejejfeeef eee ef eeef eeef edef d dœdd„Zed	œdd„Z‡  ZS )ÚWebhookInstancec                   @   s   e Zd ZdZdZdS )zWebhookInstance.MethodÚGETÚPOSTN)Ú__name__Ú
__module__Ú__qualname__r   r   © r   r   úq/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/conversations/v1/configuration/webhook.pyÚMethod   s   r   c                   @   s   e Zd ZdZdZdS )úWebhookInstance.TargetZwebhookZflexN)r   r   r   ZWEBHOOKZFLEXr   r   r   r   ÚTarget   s   r   )ÚversionÚpayloadc                    sj   t ƒ  |¡ | d¡| _| d¡| _| d¡| _| d¡| _| d¡| _| d¡| _| d¡| _	d | _
d S )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__r   r   r"   +   s    zWebhookInstance.__init__ÚWebhookContext©Úreturnc                 C   s   | j dkr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
        N)r$   r(   Ú_version©r%   r   r   r   Ú_proxy8   s
    
ÿzWebhookInstance._proxyc                 C   s
   | j  ¡ S )ú[
        Fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        )r-   Úfetchr,   r   r   r   r/   F   s    zWebhookInstance.fetchc                 Ã   s   | j  ¡ I dH S )úu
        Asynchronous coroutine to fetch the WebhookInstance


        :returns: The fetched WebhookInstance
        N)r-   Úfetch_asyncr,   r   r   r   r1   O   s    zWebhookInstance.fetch_asyncr   ©r   r   r   r   r   r*   c                 C   s   | j j|||||d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   )r-   Úupdate©r%   r   r   r   r   r   r   r   r   r5   X   s    ûzWebhookInstance.updatec                 Ã   s   | j j|||||dI dH S )áë  
        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
        r4   N)r-   Úupdate_asyncr6   r   r   r   r8   s   s    ûzWebhookInstance.update_asyncc                 C   s   dS )úf
        Provide a friendly representation

        :returns: Machine friendly representation
        z)<Twilio.Conversations.V1.WebhookInstance>r   r,   r   r   r   Ú__repr__Ž   s    zWebhookInstance.__repr__)r   r   r   Úobjectr   r   r   r   Ústrr   r"   Úpropertyr-   r/   r1   r   Úunsetr   r   r5   r8   r:   Ú__classcell__r   r   r&   r   r      sD   	ú



ùú



ùr   c                       s   e Zd Zedœ‡ fdd„Zedœdd„Zedœdd„Zej	ej	ej	ej	ej	fe
eef e
ee ef e
eef e
eef e
d	ef ed
œdd„Zej	ej	ej	ej	ej	fe
eef e
ee ef e
eef e
eef e
d	ef ed
œdd„Zedœdd„Z‡  ZS )r(   ©r   c                    s   t ƒ  |¡ d| _dS )zk
        Initialize the WebhookContext

        :param version: Version that contains the resource
        z/Configuration/WebhooksN)r!   r"   Ú_uri©r%   r   r&   r   r   r"   š   s    zWebhookContext.__init__r)   c                 C   s2   t  i ¡}d|d< | jjd| j|d}t| j|ƒS )r.   úapplication/jsonÚAcceptr   ©r   ÚuriÚheaders)r   Úofr+   r/   rA   r   ©r%   rG   r   r   r   r   r/   ¤   s    
þzWebhookContext.fetchc                 Ã   s8   t  i ¡}d|d< | jjd| j|dI dH }t| j|ƒS )r0   rC   rD   r   rE   N)r   rH   r+   r1   rA   r   rI   r   r   r   r1   ·   s    
  ÿþzWebhookContext.fetch_asyncr   r2   c           	      C   s^   t  |t |dd„ ¡|||dœ¡}t  i ¡}d|d< d|d< | jjd| j||d	}t| j|ƒS )
r3   c                 S   s   | S ©Nr   ©Úer   r   r   Ú<lambda>ã   ó    z'WebhookContext.update.<locals>.<lambda>©r   ZFiltersZPreWebhookUrlZPostWebhookUrlr   ú!application/x-www-form-urlencodedúContent-TyperC   rD   r   ©r   rF   ÚdatarG   )r   rH   r   Úmapr+   r5   rA   r   ©	r%   r   r   r   r   r   rS   rG   r   r   r   r   r5   Ì   s$    ûÿ	
   ÿzWebhookContext.updatec           	      Ã   sd   t  |t |dd„ ¡|||dœ¡}t  i ¡}d|d< d|d< | jjd| j||d	I d
H }t| j|ƒS )r7   c                 S   s   | S rJ   r   rK   r   r   r   rM     rN   z-WebhookContext.update_async.<locals>.<lambda>rO   rP   rQ   rC   rD   r   rR   N)r   rH   r   rT   r+   r8   rA   r   rU   r   r   r   r8   õ   s$    ûÿ	
   ÿzWebhookContext.update_asyncc                 C   s   dS )r9   z(<Twilio.Conversations.V1.WebhookContext>r   r,   r   r   r   r:     s    zWebhookContext.__repr__)r   r   r   r   r"   r   r/   r1   r   r>   r   r<   r;   r   r5   r8   r:   r?   r   r   r&   r   r(   ˜   s<   
ú



ù+ú



ù)r(   c                       sL   e Zd Zedœ‡ fdd„Zedœdd„Zedœdd„Zedœd	d
„Z	‡  Z
S )ÚWebhookListr@   c                    s   t ƒ  |¡ dS )zi
        Initialize the WebhookList

        :param version: Version that contains the resource

        N)r!   r"   rB   r&   r   r   r"   *  s    zWebhookList.__init__r)   c                 C   s
   t | jƒS ©z.
        Constructs a WebhookContext

        ©r(   r+   r,   r   r   r   r#   3  s    zWebhookList.getc                 C   s
   t | jƒS rW   rX   r,   r   r   r   Ú__call__:  s    zWebhookList.__call__c                 C   s   dS )r9   z%<Twilio.Conversations.V1.WebhookList>r   r,   r   r   r   r:   A  s    zWebhookList.__repr__)r   r   r   r   r"   r(   r#   rY   r<   r:   r?   r   r   r&   r   rV   (  s   	rV   N)Ú__doc__Útypingr   r   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr	   Ztwilio.base.instance_resourcer
   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r(   rV   r   r   r   r   Ú<module>   s     