
    pi/                         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
e      Z G d de      Z G d de      Zy)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            
           e Zd Z G d de      Z G d de      Z	 	 	 ddedeee	f   de
e   de
e   f fd	Zedd       Zej                  ej                  ej                  fdedef   dedef   deeef   d
d fdZej                  ej                  ej                  fdedef   dedef   deeef   d
d fdZd
efdZ xZS )ChannelInstancec                       e Zd ZdZdZy)ChannelInstance.ChannelTypepublicprivateN)__name__
__module____qualname__PUBLICPRIVATE     ]/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/chat/v3/channel.pyChannelTyper      s    r   r   c                       e Zd ZdZdZy)"ChannelInstance.WebhookEnabledTypetruefalseN)r   r   r   TRUEFALSEr   r   r   WebhookEnabledTyper      s    r   r#   versionpayloadservice_sidsidc                 ~   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        t        j                  |j                  d            | _        t        j                  |j                  d	            | _        |j                  d
      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d      | _        |xs | j
                  |xs | j                  d| _        d | _        y )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/   r0   integerr1   r2   r3   r4   	_solution_context)selfr$   r%   r&   r'   	__class__s        r   r7   zChannelInstance.__init__3   sj    	!")++e"4*1++m*D*1++m*D,3KK,H*1++m*D)0\)B=D[[=P	0;0L0LKK'1
 1<0L0LKK'1
 *1\)B,7,?,?KK(-
 .9-@-@KK().
 5<KK@W4X"")++e"4 ':$*:*:?$((
 37r   returnc                     | j                   7t        | j                  | j                  d   | j                  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
        r&   r'   r5   )r<   ChannelContext_versionr;   r=   s    r   _proxyzChannelInstance._proxyY   sE     == * NN=9NN5)DM
 }}r   x_twilio_webhook_enabledr   r-   r   r3   c                 >    | j                   j                  |||      S )o  
        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/messaging/api/service-resource) this channel belongs to.

        :returns: The updated ChannelInstance
        rE   r-   r3   )rD   updater=   rE   r-   r3   s       r   rI   zChannelInstance.updatei   s)    " {{!!%="7 " 
 	
r   c                 Z   K   | j                   j                  |||       d{   S 7 w)  
        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/messaging/api/service-resource) this channel belongs to.

        :returns: The updated ChannelInstance
        rH   N)rD   update_asyncrJ   s       r   rM   zChannelInstance.update_async   s7     " [[--%="7 . 
 
 	
 
s   "+)+c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r   	<genexpr>z+ChannelInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z#<Twilio.Chat.V3.ChannelInstance {}>joinr;   itemsrT   r=   contexts     r   __repr__zChannelInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr   )NN)r?   rA   )r   r   r   objectr   r#   r   r   strr   r   r7   propertyrD   r	   unsetr   rI   rM   ra   __classcell__r>   s   @r   r   r      sL   f V * &*!$7$7 c3h$7 c]	$7
 c]$7L  & LL=C\\4:LL
"'0&8#


 169:
  %S&[1
 

6 LL=C\\4:LL
"'0&8#


 169:
  %S&[1
 

.E# Er   r   c            	       ,    e Zd Zdededef fdZej                  ej                  ej                  fdede	f   dede	f   d	eee	f   d
e
fdZej                  ej                  ej                  fdede	f   dede	f   d	eee	f   d
e
fdZd
efdZ xZS )rA   r$   r&   r'   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)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.
        r5   z&/Services/{service_sid}/Channels/{sid}Nr   )r6   r7   r;   rT   _uri)r=   r$   r&   r'   r>   s       r   r7   zChannelContext.__init__   sB     	! '
 D<CCUdnnU	r   rE   r   r-   r   r3   r?   c                 z   t        j                  ||d      }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   d|d<   | j
                  j                  d| j                  ||      }t        | j
                  || j                  d	   | j                  d
         S )rG   TypeMessagingServiceSidX-Twilio-Webhook-Enabled!application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethoduridataheadersr&   r'   r5   )
r	   ofre   
isinstancerc   rB   rI   rj   r   r;   r=   rE   r-   r3   rx   ry   r%   s          r   rI   zChannelContext.update   s    $ yy'<
 ))B- %43S90 3KG./"E.--&&tyytW ' 
 MM}5u%	
 	
r   c                   K   t        j                  ||d      }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   d|d<   | j
                  j                  d| j                  ||       d	{   }t        | j
                  || j                  d
   | j                  d         S 7 7w)rL   rl   ro   rp   rq   rr   rs   rt   ru   Nr&   r'   r5   )
r	   rz   re   r{   rc   rB   rM   rj   r   r;   r|   s          r   rM   zChannelContext.update_async   s     $ yy'<
 ))B- %43S90 3KG./"E.22tyytW 3 
 
 MM}5u%	
 	
	
s   BC	C8C	c                     dj                  d | j                  j                         D              }dj                  |      S )rO   rP   c              3   F   K   | ]  \  }}d j                  ||        ywrR   rS   rU   s      r   rY   z*ChannelContext.__repr__.<locals>.<genexpr>  rZ   r[   z"<Twilio.Chat.V3.ChannelContext {}>r\   r_   s     r   ra   zChannelContext.__repr__  s6     ((SDNN<P<P<RSS3::7CCr   )r   r   r   r   rc   r7   r	   re   r   rb   r   rI   rM   ra   rf   rg   s   @r   rA   rA      s    V Vc V V* LL=C\\4:LL0
"'0&8#
0

 169:0
  %S&[10
 
0
l LL=C\\4:LL0
"'0&8#
0

 169:0
  %S&[10
 
0
dD# Dr   rA   c                   X     e Zd Zdef fdZdededefdZdededefdZdefdZ	 xZ
S )	ChannelListr$   c                 $    t         |   |       y)zi
        Initialize the ChannelList

        :param version: Version that contains the resource

        N)r6   r7   )r=   r$   r>   s     r   r7   zChannelList.__init__$  s     	!r   r&   r'   r?   c                 2    t        | j                  ||      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.
        r5   rA   rB   r=   r&   r'   s      r   r8   zChannelList.get-       dmm#NNr   c                 2    t        | j                  ||      S r   r   r   s      r   __call__zChannelList.__call__6  r   r   c                      y)rO   z<Twilio.Chat.V3.ChannelList>r   rC   s    r   ra   zChannelList.__repr__?  s     .r   )r   r   r   r   r7   rc   rA   r8   r   ra   rf   rg   s   @r   r   r   "  sW    " "Os O O OOC Oc On O.# .r   r   N)__doc__r   typingr   r   r   r   twilio.baser   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   rA   r   r   r   r   <module>r      sS     - - + 8 : 2 'FE& FER~D_ ~DB#., #.r   