a
    !fK+                     @   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   s/var/www/html/python-backend/venv/lib/python3.9/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u 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`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`
        :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`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`
        :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   s   | j jd| jd}t| j |S )r.   r   r   uri)r+   r/   rA   r   r%   r   r   r   r   r/      s    zWebhookContext.fetchc                    s$   | j jd| jdI dH }t| j |S )r0   r   rC   N)r+   r1   rA   r   rE   r   r   r   r1      s    zWebhookContext.fetch_asyncr   r2   c                 C   sB   t |t|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   r   r   rD   data)r   ofr   mapr+   r5   rA   r   r%   r   r   r   r   r   rM   r   r   r   r   r5      s    
zWebhookContext.updatec                    sH   t |t|dd |||d}| jjd| j|dI dH }t| j|S )r7   c                 S   s   | S rF   r   rG   r   r   r   rI     rJ   z-WebhookContext.update_async.<locals>.<lambda>rK   r   rL   N)r   rN   r   rO   r+   r8   rA   r   rP   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#   %  s    zWebhookList.getc                 C   s
   t | jS rR   rS   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:   3  s    zWebhookList.__repr__)r   r   r   r   r"   r(   r#   rT   r<   r:   r?   r   r   r&   r   rQ     s   	rQ   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(   rQ   r   r   r   r   <module>   s     