
    piZ                         d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZ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 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ListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd ZdZ	 ddedeeef   dededee   f
 fdZ	e
dd	       Zdefd
ZdefdZddZddZdefdZ xZS )InviteInstanceaG  
    :ivar sid: The unique string that we created to identify the Invite resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Invite resource.
    :ivar channel_sid: The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource belongs to.
    :ivar service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the Invite resource is associated with.
    :ivar identity: The application-defined string that uniquely identifies the resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.
    :ivar date_created: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar role_sid: The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the resource.
    :ivar created_by: The `identity` of the User that created the invite.
    :ivar url: The absolute URL of the Invite resource.
    versionpayloadservice_sidchannel_sidsidc                 h   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _
        t        j                  |j                  d            | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |||xs | j                  d| _        d | _        y )Nr   account_sidr   r   identitydate_createddate_updatedrole_sid
created_byurlr   r   r   )super__init__getr   r   r   r   r   r   iso8601_datetimer   r   r   r    r!   	_solution_context)selfr   r   r   r   r   	__class__s         l/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/chat/v2/service/channel/invite.pyr$   zInviteInstance.__init__'   s     	!")++e"4*1++m*D*1++m*D*1++m*D'.{{:'>0;0L0LKK'1
 1<0L0LKK'1
 (/{{:'>)0\)B")++e"4 '&?$((

 26    returnc                     | j                   Et        | j                  | j                  d   | 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: InviteContext for this InviteInstance
        r   r   r   r"   )r(   InviteContext_versionr'   r)   s    r+   _proxyzInviteInstance._proxyG   sQ     == ) NN=9 NN=9NN5)	DM }}r,   c                 6    | j                   j                         S )i
        Deletes the InviteInstance


        :returns: True if delete succeeds, False otherwise
        )r2   deleter1   s    r+   r5   zInviteInstance.deleteX   s     {{!!##r,   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the InviteInstance


        :returns: True if delete succeeds, False otherwise
        N)r2   delete_asyncr1   s    r+   r8   zInviteInstance.delete_asynca   s!      [[--////   '%'c                 6    | j                   j                         S )Y
        Fetch the InviteInstance


        :returns: The fetched InviteInstance
        )r2   fetchr1   s    r+   r<   zInviteInstance.fetchj   s     {{  ""r,   c                 R   K   | j                   j                          d{   S 7 w)s
        Asynchronous coroutine to fetch the InviteInstance


        :returns: The fetched InviteInstance
        N)r2   fetch_asyncr1   s    r+   r?   zInviteInstance.fetch_asyncs   s!      [[,,....r9   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*InviteInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z"<Twilio.Chat.V2.InviteInstance {}>joinr'   itemsrF   r)   contexts     r+   __repr__zInviteInstance.__repr__|   s6     ((SDNN<P<P<RSS3::7CCr,   N)r-   r/   )r-   r   )__name__
__module____qualname____doc__r   r   strr   r   r$   propertyr2   boolr5   r8   r<   r?   rS   __classcell__r*   s   @r+   r   r      s    & "66 c3h6 	6
 6 c]6@   $ $0D 0#/D# Dr,   r   c                   l     e Zd Zdedededef fdZdefdZdefdZde	fd	Z
de	fd
ZdefdZ xZS )r/   r   r   r   r   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)a  
        Initialize the InviteContext

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Invite resource from.
        :param channel_sid: The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`.
        :param sid: The SID of the Invite resource to fetch.
        r"   z</Services/{service_sid}/Channels/{channel_sid}/Invites/{sid}N r#   r$   r'   rF   _uri)r)   r   r   r   r   r*   s        r+   r$   zInviteContext.__init__   sM     	! '&
 RJQQ .. 		r,   r-   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r4   DELETEmethoduriheaders)r   ofr0   r5   rb   r)   rh   s     r+   r5   zInviteContext.delete   s1     ))B-}}##8G#TTr,   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r7   rd   re   N)r   ri   r0   r8   rb   rj   s     r+   r8   zInviteContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                    t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d   | j                  d         S )	r;   application/jsonAcceptGETre   r   r   r   r"   )r   ri   r0   r<   rb   r   r'   r)   rh   r   s      r+   r<   zInviteContext.fetch   su     ))B-.--%%U		7%SMM}5}5u%
 	
r,   c                 $  K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d   | j                  d   	      S 7 Ew)
r>   rm   rn   ro   re   Nr   r   r   r"   )r   ri   r0   r?   rb   r   r'   rp   s      r+   r?   zInviteContext.fetch_async   s      ))B-.11dii 2 
 
 MM}5}5u%
 	
	
s   ABB	ABc                     dj                  d | j                  j                         D              }dj                  |      S )rA   rB   c              3   F   K   | ]  \  }}d j                  ||        ywrD   rE   rG   s      r+   rK   z)InviteContext.__repr__.<locals>.<genexpr>   rL   rM   z!<Twilio.Chat.V2.InviteContext {}>rN   rQ   s     r+   rS   zInviteContext.__repr__   s6     ((SDNN<P<P<RSS299'BBr,   )rU   rV   rW   r   rY   r$   r[   r5   r8   r   r<   r?   rS   r\   r]   s   @r+   r/   r/      se    
 
c 
 
RU 
.
U 
U
D 

~ 
,
> 
0C# Cr,   r/   c                   2    e Zd Zdeeef   defdZdefdZy)
InvitePager   r-   c                 h    t        | j                  || j                  d   | j                  d         S )zl
        Build an instance of InviteInstance

        :param payload: Payload response from the API
        r   r   r   r   )r   r0   r'   )r)   r   s     r+   get_instancezInvitePage.get_instance   s3     MM}5}5	
 	
r,   c                      y)rA   z<Twilio.Chat.V2.InvitePage>r`   r1   s    r+   rS   zInvitePage.__repr__        -r,   N)	rU   rV   rW   r   rY   r   r   rx   rS   r`   r,   r+   ru   ru      s)    
DcN 
~ 
-# -r,   ru   c                       e Zd Zdededef fdZej                  fdedeee	f   de
fdZej                  fdedeee	f   de
fd	Zej                  d
d
fdeee   e	f   dee   dee   dee
   fdZej                  d
d
fdeee   e	f   dee   dee   dee
   fdZej                  d
d
fdeee   e	f   dee   dee   dee
   fdZej                  d
d
fdeee   e	f   dee   dee   dee
   fdZej                  ej                  ej                  ej                  fdeee   e	f   deee	f   deee	f   deee	f   def
dZej                  ej                  ej                  ej                  fdeee   e	f   deee	f   deee	f   deee	f   def
dZdedefdZdedefdZdedefdZdedefdZdefdZ xZS )
InviteListr   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the InviteList

        :param version: Version that contains the resource
        :param service_sid: The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Invite resources from.
        :param channel_sid: The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`.

        rw   z6/Services/{service_sid}/Channels/{channel_sid}/InvitesNr`   ra   )r)   r   r   r   r*   s       r+   r$   zInviteList.__init__  sG     	! '&
 TLSS 
nn
	r,   r   r   r-   c                 ,   t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   
      S )a  
        Create the InviteInstance

        :param identity: The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.
        :param role_sid: The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member.

        :returns: The created InviteInstance
        IdentityRoleSidContent-Type!application/x-www-form-urlencodedrm   rn   POSTrf   rg   datarh   r   r   rw   )r   ri   r0   createrb   r   r'   r)   r   r   r   rh   r   s         r+   r   zInviteList.create  s     yy$#
 ))^-PQR"E.--&&tyytW ' 
 MM}5}5	
 	
r,   c                 H  K   t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
         S 7 7w)a   
        Asynchronously create the InviteInstance

        :param identity: The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.
        :param role_sid: The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member.

        :returns: The created InviteInstance
        r   r   r   rm   rn   r   r   Nr   r   rw   )r   ri   r0   create_asyncrb   r   r'   r   s         r+   r   zInviteList.create_asyncB  s      yy$#
 ))^-PQR"E.22tyytW 3 
 
 MM}5}5	
 	
	
s   A&B"(B )8B"Nlimit	page_sizec                     | j                   j                  ||      }| j                  ||d         }| j                   j                  ||d         S )aB  
        Streams InviteInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param List[str] identity: The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   r   r   )r0   read_limitspagestreamr)   r   r   r   limitsr   s         r+   r   zInviteList.streame  sL    , **5)<yy(f[6IyJ}}##D&/::r,   c                    K   | j                   j                  ||      }| j                  ||d          d{   }| j                   j                  ||d         S 7 #w)aQ  
        Asynchronously streams InviteInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param List[str] identity: The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   Nr   )r0   r   
page_asyncstream_asyncr   s         r+   r   zInviteList.stream_async  sY     , **5)<__h&BU_VV}}))$w@@ Ws   6AA$Ac                 <    t        | j                  |||            S )a  
        Lists InviteInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param List[str] identity: The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   r   r   )listr   )r)   r   r   r   s       r+   r   zInviteList.list  s+    * KK!#  
 	
r,   c                 |   K   | j                  |||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists InviteInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param List[str] identity: The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   N)r   )r)   r   r   r   records        r+   
list_asynczInviteList.list_async  sW     . '+&7&7!# '8 ' !
 
 !
 
 	
 
s0   </<731
37<37<
page_tokenpage_numberc                 ,   t        j                  t        j                  |d       |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )	aM  
        Retrieve a single page of InviteInstance records from the API.
        Request is executed immediately

        :param identity: The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of InviteInstance
        c                     | S rT   r`   es    r+   <lambda>z!InviteList.page.<locals>.<lambda>      a r,   r   	PageTokenr   PageSizer   r   rm   rn   ro   rf   rg   paramsrh   )	r   ri   r   mapr0   r   rb   ru   r'   r)   r   r   r   r   r   rh   responses           r+   r   zInviteList.page  s    $ yy%MM(K@'#%	
 ))^-PQR.==%%diig & 
 $--4>>BBr,   c                 H  K   t        j                  t        j                  |d       |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d	{   }t        | j                  || j                        S 7 %w)
a\  
        Asynchronously retrieve a single page of InviteInstance records from the API.
        Request is executed immediately

        :param identity: The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of InviteInstance
        c                     | S rT   r`   r   s    r+   r   z'InviteList.page_async.<locals>.<lambda>  r   r,   r   r   r   rm   rn   ro   r   N)	r   ri   r   r   r0   r   rb   ru   r'   r   s           r+   r   zInviteList.page_async  s     $ yy%MM(K@'#%	
 ))^-PQR.11diig 2 
 
 $--4>>BB
s   A8B":B ;&B"
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of InviteInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of InviteInstance
        ro   )r0   domaintwiliorequestru   r'   r)   r   r   s      r+   get_pagezInviteList.get_page  s=     ==''..66ujI$--4>>BBr,   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a   
        Asynchronously retrieve a specific page of InviteInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of InviteInstance
        ro   N)r0   r   r   request_asyncru   r'   r   s      r+   get_page_asynczInviteList.get_page_async*  sJ      --44BB5*UU$--4>>BB Vs   4AA&Ar   c                 h    t        | j                  | j                  d   | j                  d   |      S zj
        Constructs a InviteContext

        :param sid: The SID of the Invite resource to fetch.
        r   r   r"   r/   r0   r'   r)   r   s     r+   r%   zInviteList.get6  3     MM}5}5	
 	
r,   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r+   __call__zInviteList.__call__C  r   r,   c                      y)rA   z<Twilio.Chat.V2.InviteList>r`   r1   s    r+   rS   zInviteList.__repr__P  rz   r,   ) rU   rV   rW   r   rY   r$   r   unsetr   objectr   r   r   r   r   intr	   r   r
   r   r   r   ru   r   r   r   r   r/   r%   r   rS   r\   r]   s   @r+   r|   r|   	  s=   
 
c 
 
* =CLL!
!
',S&['9!
	!
H =CLL!
!
',S&['9!
	!
J .4\\##'	;S	6)*; }; C=	;
 
.	!;: .4\\##'	AS	6)*A }A C=	A
 
~	&A: .4\\##'	
S	6)*
 }
 C=	

 
n	
> .4\\##'	
S	6)*
 }
 C=	

 
n	
@ .4\\)/*0,,(."CS	6)*"C #v+&"C 3;'	"C
 f%"C 
"CL .4\\)/*0,,(."CS	6)*"C #v+&"C 3;'	"C
 f%"C 
"CH
C3 
C: 
C
Cs 
Cz 
C
s 
} 

C 
M 
-# -r,   r|   N)rX   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r/   ru   r|   r`   r,   r+   <module>r      sj     L L L 6 6 8 : 2 ' !jD% jDZhCO hCV- -0M- M-r,   