
    d{iF                         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 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)ApiResponse)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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 )ChannelInstancec                       e Zd ZdZdZy)ChannelInstance.ChannelTypepublicprivateN)__name__
__module____qualname__PUBLICPRIVATE     Y/home/sas/my/fyp/ringai/.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/   r0   r1   integerr2   r3   r4   r5   	_solution_context)selfr%   r&   r'   r(   	__class__s        r   r8   zChannelInstance.__init__4   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(   r6   )r=   ChannelContext_versionr<   r>   s    r   _proxyzChannelInstance._proxyZ   sE     == * NN=9NN5)DM
 }}r   x_twilio_webhook_enabledr   r.   r   r4   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
        rF   r.   r4   )rE   updater>   rF   r.   r4   s       r   rJ   zChannelInstance.updatej   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
        rI   N)rE   update_asyncrK   s       r   rN   zChannelInstance.update_async   s7     " [[--%="7 . 
 
 	
 
   "+)+c                 >    | j                   j                  |||      S )a  
        Update the ChannelInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        rI   )rE   update_with_http_inforK   s       r   rQ   z%ChannelInstance.update_with_http_info   s)    " {{00%="7 1 
 	
r   c                 Z   K   | j                   j                  |||       d{   S 7 w)a  
        Asynchronous coroutine to update the ChannelInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        rI   N)rE   update_with_http_info_asyncrK   s       r   rS   z+ChannelInstance.update_with_http_info_async   s7     " [[<<%="7 = 
 
 	
 
rO   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<   itemsrZ   r>   contexts     r   __repr__zChannelInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr   )NN)r@   rB   )r   r   r   objectr   r$   r   r   strr   r   r8   propertyrE   r	   unsetr   rJ   rN   r
   rQ   rS   rg   __classcell__r?   s   @r   r   r      s   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
 

6 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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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 )rB   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.
        r6   z&/Services/{service_sid}/Channels/{sid}Nr   )r7   r8   r<   rZ   _uri)r>   r%   r'   r(   r?   s       r   r8   zChannelContext.__init__   sB     	! '
 D<CCUdnnU	r   rF   r   r.   r   r4   r@   c                    t        j                  ||d      }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   d|d<   | j
                  j                  d| j                  ||      S )	z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        TypeMessagingServiceSidX-Twilio-Webhook-Enabled!application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethoduridataheaders)r	   ofrk   
isinstanceri   rC   update_with_response_inforp   r>   rF   r.   r4   r~   r   s         r   _updatezChannelContext._update   s     yy'<
 ))B- %43S90 3KG./"E.}}66tyytW 7 
 	
r   c                     | j                  |||      \  }}}t        | j                  || j                  d   | j                  d         S )rH   rI   r'   r(   r6   )r   r   rC   r<   r>   rF   r.   r4   r&   _s         r   rJ   zChannelContext.update  sW    " %="7 % 
A
 MM}5u%	
 	
r   c                     | j                  |||      \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )a  
        Update the ChannelInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        rI   r'   r(   r6   r~   status_coder   )r   r   rC   r<   r
   r>   rF   r.   r4   r&   r   r   instances           r   rQ   z$ChannelContext.update_with_http_info(  sf    " )-%="7 )5 )
%g
 #MM}5u%	
 k7SSr   c                 0  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	{   S 7 w)
z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        rr   ru   rv   rw   rx   ry   rz   r{   N)r	   r   rk   r   ri   rC   update_with_response_info_asyncrp   r   s         r   _update_asynczChannelContext._update_asyncF  s      yy'<
 ))B- %43S90 3KG./"E.]]BBtyytW C 
 
 	
 
s   BBBBc                    K   | j                  |||       d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rM   rI   Nr'   r(   r6   )r   r   rC   r<   r   s         r   rN   zChannelContext.update_asyncn  sg     " #00%="7 1 
 
A
 MM}5u%	
 	

s   AA<Ac                    K   | j                  |||       d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)a  
        Asynchronous coroutine to update the ChannelInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        rI   Nr'   r(   r6   r   )r   r   rC   r<   r
   r   s           r   rS   z*ChannelContext.update_with_http_info_async  sw     " /3.@.@%="7 /A /
 )
%g
 #MM}5u%	
 k7SS)
s   A&A$A
A&c                     dj                  d | j                  j                         D              }dj                  |      S )rU   rV   c              3   F   K   | ]  \  }}d j                  ||        ywrX   rY   r[   s      r   r_   z*ChannelContext.__repr__.<locals>.<genexpr>  r`   ra   z"<Twilio.Chat.V3.ChannelContext {}>rb   re   s     r   rg   zChannelContext.__repr__  s6     ((SDNN<P<P<RSS3::7CCr   )r   r   r   r   ri   r8   r	   rk   r   rh   tupler   r   rJ   r
   rQ   r   rN   rS   rg   rl   rm   s   @r   rB   rB      s   V Vc V V* LL=C\\4:LL&
"'0&8#
&

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

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

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

 169:
  %S&[1
 

B LL=C\\4:LLT"'0&8#
T
 169:T  %S&[1T 
T<D# Dr   rB   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)r7   r8   )r>   r%   r?   s     r   r8   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.
        r6   rB   rC   r>   r'   r(   s      r   r9   zChannelList.get       dmm#NNr   c                 2    t        | j                  ||      S r   r   r   s      r   __call__zChannelList.__call__  r   r   c                      y)rU   z<Twilio.Chat.V3.ChannelList>r   rD   s    r   rg   zChannelList.__repr__  s     .r   )r   r   r   r   r8   ri   rB   r9   r   rg   rl   rm   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.api_responser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   rB   r   r   r   r   <module>r      sV     - - + 0 8 : 2 'tE& tEn`D_ `DF#., #.r   