a
    !f/-                     @   s   d Z ddl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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 - Chat
    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.
    )datetime)AnyDictOptionalUnion)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       s   e Zd ZG dd deZG dd deZdeeee	f e
e e
e d fddZed	d
ddZejejejfedef edef eeef d dddZejejejfedef edef eeef d dddZed
ddZ  ZS )ChannelInstancec                   @   s   e Zd ZdZdZdS )ChannelInstance.ChannelTypepublicprivateN)__name__
__module____qualname__ZPUBLICZPRIVATE r   r   \/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/chat/v3/channel.pyChannelType   s   r   c                   @   s   e Zd ZdZdZdS )"ChannelInstance.WebhookEnabledTypetruefalseN)r   r   r   TRUEFALSEr   r   r   r   WebhookEnabledType   s   r   N)versionpayloadservice_sidsidc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	t
|d| _t
|d	| _|d
| _t
|d| _t
|d| _|d| _|d| _|p| j|p| jd| _d | _d S )Nr    account_sidr   friendly_nameunique_name
attributestypedate_createddate_updated
created_bymembers_countmessages_countmessaging_service_sidurlr   r    )super__init__getr    r!   r   r"   r#   r$   r%   r   iso8601_datetimer&   r'   r(   integerr)   r*   r+   r,   	_solution_context)selfr   r   r   r    	__class__r   r   r/   3   s6    zChannelInstance.__init__ChannelContextreturnc                 C   s.   | j du r(t| j| jd | jd d| _ | 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: ChannelContext for this ChannelInstance
        Nr   r    r-   )r4   r8   _versionr3   r5   r   r   r   _proxyY   s    
zChannelInstance._proxyr   r   x_twilio_webhook_enabledr%   r+   r:   c                 C   s   | j j|||dS )a  
        Update the ChannelInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param type:
        :param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this channel belongs to.

        :returns: The updated ChannelInstance
        r?   r%   r+   )r=   updater5   r?   r%   r+   r   r   r   rB   i   s
    zChannelInstance.updatec                    s   | j j|||dI dH S ){  
        Asynchronous coroutine to update the ChannelInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param type:
        :param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this channel belongs to.

        :returns: The updated ChannelInstance
        rA   N)r=   update_asyncrC   r   r   r   rE      s
    zChannelInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>       z+ChannelInstance.__repr__.<locals>.<genexpr>z#<Twilio.Chat.V3.ChannelInstance {}>joinr3   itemsrJ   r5   contextr   r   r   __repr__   s    zChannelInstance.__repr__)NN)r   r   r   objectr   r   r   r   strr   r   r/   propertyr=   r   unsetr   rB   rE   rV   __classcell__r   r   r6   r   r      sF     
&



r   c                       s   e Zd Zeeed fddZejejejfede	f ede	f eee	f e
dddZejejejfede	f ede	f eee	f e
dd	d
ZedddZ  ZS )r8   )r   r   r    c                    s0   t  | ||d| _djf i | j| _dS )a  
        Initialize the ChannelContext

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.
        :param sid: A 34 character string that uniquely identifies this Channel.
        r-   z&/Services/{service_sid}/Channels/{sid}N)r.   r/   r3   rJ   _uri)r5   r   r   r    r6   r   r   r/      s
    zChannelContext.__init__r   r   r>   c                 C   sR   t ||d}t d|i}| jjd| j||d}t| j|| jd | jd dS )r@   TypeZMessagingServiceSidX-Twilio-Webhook-EnabledPOSTmethoduridataheadersr   r    r-   )r   ofr;   rB   r\   r   r3   r5   r?   r%   r+   rd   re   r   r   r   r   rB      s$    
zChannelContext.updatec                    sX   t ||d}t d|i}| jjd| j||dI dH }t| j|| jd | jd dS )	rD   r]   r_   r`   ra   Nr   r    r-   )r   rf   r;   rE   r\   r   r3   rg   r   r   r   rE      s$    
zChannelContext.update_asyncr9   c                 C   s$   d dd | j D }d|S )rF   rG   c                 s   s   | ]\}}d  ||V  qdS rH   rI   rK   r   r   r   rO   	  rP   z*ChannelContext.__repr__.<locals>.<genexpr>z"<Twilio.Chat.V3.ChannelContext {}>rQ   rT   r   r   r   rV     s    zChannelContext.__repr__)r   r   r   r   rX   r/   r   rZ   r   rW   r   rB   rE   rV   r[   r   r   r6   r   r8      s0   

,

(r8   c                       sT   e Zd Zed fddZeeedddZeeedddZed	d
dZ	  Z
S )ChannelList)r   c                    s   t  | dS )zi
        Initialize the ChannelList

        :param version: Version that contains the resource

        N)r.   r/   )r5   r   r6   r   r   r/     s    zChannelList.__init__)r   r    r:   c                 C   s   t | j||dS z
        Constructs a ChannelContext

        :param service_sid: The unique SID identifier of the Service.
        :param sid: A 34 character string that uniquely identifies this Channel.
        r-   r8   r;   r5   r   r    r   r   r   r0     s    zChannelList.getc                 C   s   t | j||dS ri   rj   rk   r   r   r   __call__   s    zChannelList.__call__r9   c                 C   s   dS )rF   z<Twilio.Chat.V3.ChannelList>r   r<   r   r   r   rV   )  s    zChannelList.__repr__)r   r   r   r   r/   rX   r8   r0   rl   rV   r[   r   r   r6   r   rh     s   			rh   N)__doc__r   typingr   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   r8   rh   r   r   r   r   <module>   s    	l