o
    e?,                     @   s   d Z ddlmZ ddl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G dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	ChannelListc                    s   t t| | i | _dS )z
        Initialize the ChannelList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.chat.v3.channel.ChannelList
        :rtype: twilio.rest.chat.v3.channel.ChannelList
        N)superr   __init__	_solution)selfversion	__class__ N/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/chat/v3/channel.pyr
      s   	
zChannelList.__init__c                 C      t | j||dS a  
        Constructs a ChannelContext

        :param service_sid: Service Sid.
        :param sid: A string that uniquely identifies this Channel.

        :returns: twilio.rest.chat.v3.channel.ChannelContext
        :rtype: twilio.rest.chat.v3.channel.ChannelContext
        service_sidsidChannelContext_versionr   r   r   r   r   r   get!      
zChannelList.getc                 C   r   r   r   r   r   r   r   __call__-   r   zChannelList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Chat.V3.ChannelList>r   r   r   r   r   __repr__9      zChannelList.__repr__)__name__
__module____qualname__r
   r   r   r!   __classcell__r   r   r   r   r      s
    r   c                       s,   e Zd Z fddZdd Zdd Z  ZS )ChannelPagec                    s   t t| || || _dS )a  
        Initialize the ChannelPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.chat.v3.channel.ChannelPage
        :rtype: twilio.rest.chat.v3.channel.ChannelPage
        N)r	   r'   r
   r   )r   r   responsesolutionr   r   r   r
   E   s   

zChannelPage.__init__c                 C   s   t | j|S )z
        Build an instance of ChannelInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.chat.v3.channel.ChannelInstance
        :rtype: twilio.rest.chat.v3.channel.ChannelInstance
        )ChannelInstancer   )r   payloadr   r   r   get_instanceT   s   	zChannelPage.get_instancec                 C   r   )r   z<Twilio.Chat.V3.ChannelPage>r   r    r   r   r   r!   _   r"   zChannelPage.__repr__)r#   r$   r%   r
   r,   r!   r&   r   r   r   r   r'   C   s    r'   c                       s:   e Zd Z fddZejejejfddZdd Z  ZS )r   c                    s4   t t| | ||d| _djdi | j| _dS )aY  
        Initialize the ChannelContext

        :param Version version: Version that contains the resource
        :param service_sid: Service Sid.
        :param sid: A string that uniquely identifies this Channel.

        :returns: twilio.rest.chat.v3.channel.ChannelContext
        :rtype: twilio.rest.chat.v3.channel.ChannelContext
        r   z&/Services/{service_sid}/Channels/{sid}Nr   )r	   r   r
   r   format_uri)r   r   r   r   r   r   r   r
   k   s   zChannelContext.__init__c                 C   sR   t ||d}t d|i}| jjd| j||d}t| j|| jd | jd dS )  
        Update the ChannelInstance

        :param ChannelInstance.ChannelType type: The Type for this Channel to migrate to.
        :param unicode messaging_service_sid: The unique ID of the Messaging Service this channel belongs to.
        :param ChannelInstance.WebhookEnabledType x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header

        :returns: The updated ChannelInstance
        :rtype: twilio.rest.chat.v3.channel.ChannelInstance
        )TypeMessagingServiceSidzX-Twilio-Webhook-EnabledPOST)methoduridataheadersr   r   r   )r   ofr   updater.   r*   r   )r   typemessaging_service_sidx_twilio_webhook_enabledr5   r6   r+   r   r   r   r8   |   s   zChannelContext.updatec                 C   $   d dd | j D }d|S )r    c                 s        | ]\}}d  ||V  qdS z{}={}Nr-   .0kvr   r   r   	<genexpr>       z*ChannelContext.__repr__.<locals>.<genexpr>z"<Twilio.Chat.V3.ChannelContext {}>joinr   itemsr-   r   contextr   r   r   r!         
zChannelContext.__repr__)	r#   r$   r%   r
   r   unsetr8   r!   r&   r   r   r   r   r   i   s    
r   c                       s  e Zd ZG dd deZG dd deZd* fdd	Zedd	 Zed
d Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zed d! Zed"d# Zed$d% Zejejejfd&d'Zd(d) Z  ZS )+r*   c                   @      e Zd ZdZdZdS )zChannelInstance.ChannelTypepublicprivateN)r#   r$   r%   PUBLICPRIVATEr   r   r   r   ChannelType       rS   c                   @   rN   )z"ChannelInstance.WebhookEnabledTypetruefalseN)r#   r$   r%   TRUEFALSEr   r   r   r   WebhookEnabledType   rT   rY   Nc                    s   t t| | |d|d|d|d|d|d|dt|dt|d	|d
t|dt|d|d|dd| _d| _|pY| jd |p_| jd d| _	dS )z
        Initialize the ChannelInstance

        :returns: twilio.rest.chat.v3.channel.ChannelInstance
        :rtype: twilio.rest.chat.v3.channel.ChannelInstance
        r   account_sidr   friendly_nameunique_name
attributesr9   date_createddate_updated
created_bymembers_countmessages_countr:   url)r   rZ   r   r[   r\   r]   r9   r^   r_   r`   ra   rb   r:   rc   Nr   )
r	   r*   r
   r   r   iso8601_datetimeinteger_properties_contextr   )r   r   r+   r   r   r   r   r   r
      s(   zChannelInstance.__init__c                 C   s.   | j du rt| j| jd | jd d| _ | j S )a%  
        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
        :rtype: twilio.rest.chat.v3.channel.ChannelContext
        Nr   r   r   )rg   r   r   r   r    r   r   r   _proxy   s   
	zChannelInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r   rf   r    r   r   r   r         
zChannelInstance.sidc                 C   ri   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        rZ   rj   r    r   r   r   rZ      rk   zChannelInstance.account_sidc                 C   ri   )zo
        :returns: The SID of the Service that the resource is associated with
        :rtype: unicode
        r   rj   r    r   r   r   r      rk   zChannelInstance.service_sidc                 C   ri   )zi
        :returns: The string that you assigned to describe the resource
        :rtype: unicode
        r[   rj   r    r   r   r   r[      rk   zChannelInstance.friendly_namec                 C   ri   )zw
        :returns: An application-defined string that uniquely identifies the resource
        :rtype: unicode
        r\   rj   r    r   r   r   r\      rk   zChannelInstance.unique_namec                 C   ri   )zi
        :returns: The JSON string that stores application-specific data
        :rtype: unicode
        r]   rj   r    r   r   r   r]     rk   zChannelInstance.attributesc                 C   ri   )z
        :returns: The visibility of the channel. Can be: `public` or `private`
        :rtype: ChannelInstance.ChannelType
        r9   rj   r    r   r   r   r9     rk   zChannelInstance.typec                 C   ri   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        r^   rj   r    r   r   r   r^     rk   zChannelInstance.date_createdc                 C   ri   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        r_   rj   r    r   r   r   r_     rk   zChannelInstance.date_updatedc                 C   ri   )ze
        :returns: The identity of the User that created the channel
        :rtype: unicode
        r`   rj   r    r   r   r   r`   $  rk   zChannelInstance.created_byc                 C   ri   )zX
        :returns: The number of Members in the Channel
        :rtype: unicode
        ra   rj   r    r   r   r   ra   ,  rk   zChannelInstance.members_countc                 C   ri   )zo
        :returns: The number of Messages that have been passed in the Channel
        :rtype: unicode
        rb   rj   r    r   r   r   rb   4  rk   zChannelInstance.messages_countc                 C   ri   )zs
        :returns: The unique ID of the Messaging Service this channel belongs to.
        :rtype: unicode
        r:   rj   r    r   r   r   r:   <  rk   z%ChannelInstance.messaging_service_sidc                 C   ri   )z\
        :returns: The absolute URL of the Channel resource
        :rtype: unicode
        rc   rj   r    r   r   r   rc   D  rk   zChannelInstance.urlc                 C   s   | j j|||dS )r/   )r9   r:   r;   )rh   r8   )r   r9   r:   r;   r   r   r   r8   L  s
   zChannelInstance.updatec                 C   r<   )r   r=   c                 s   r>   r?   r@   rA   r   r   r   rE   e  rF   z+ChannelInstance.__repr__.<locals>.<genexpr>z#<Twilio.Chat.V3.ChannelInstance {}>rG   rJ   r   r   r   r!   ^  rL   zChannelInstance.__repr__)NN)r#   r$   r%   objectrS   rY   r
   propertyrh   r   rZ   r   r[   r\   r]   r9   r^   r_   r`   ra   rb   r:   rc   r   rM   r8   r!   r&   r   r   r   r   r*      sL    "















r*   N)__doc__twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r'   r   r*   r   r   r   r   <module>   s   2&6