
    pi{J                         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 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 - Conversations
    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values)InstanceResource)ListResource)Version)Pagec                   V     e Zd Z G d de      Z	 dedeeef   f fdZ	defdZ
 xZS )ParticipantConversationInstancec                       e Zd ZdZdZdZy)%ParticipantConversationInstance.StateinactiveactiveclosedN)__name__
__module____qualname__INACTIVEACTIVECLOSED     w/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/conversations/v1/participant_conversation.pyStater      s    r   r!   versionpayloadc                 0   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y )Naccount_sidchat_service_sidparticipant_sidparticipant_user_sidparticipant_identityparticipant_messaging_bindingconversation_sidconversation_unique_nameconversation_friendly_nameconversation_attributesconversation_date_createdconversation_date_updatedconversation_created_byconversation_stateconversation_timerslinks)super__init__getr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r   iso8601_datetimer/   r0   r1   r2   r3   r4   )selfr"   r#   	__class__s      r    r6   z(ParticipantConversationInstance.__init__3   so   !*1++m*D/6{{;M/N.5kk:K.L3:;;?U3V!3:;;?U3V!JQ+++K
* 07{{;M/N7>{{&8
% :A(:
' 7>kk%7
$ ((5P)QR 	& ((5P)QR 	& 7>kk%7
$ KK,- 	 AH!A
  3:++g2F
r   returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z9<Twilio.Conversations.V1.ParticipantConversationInstance>r   r9   s    r    __repr__z(ParticipantConversationInstance.__repr__Y   s     Kr   )r   r   r   objectr!   r   r   strr   r6   r?   __classcell__r:   s   @r    r   r      sA     
&$G $G$sCx. $GLK# Kr   r   c                   2    e Zd Zdeeef   defdZdefdZy)ParticipantConversationPager#   r;   c                 .    t        | j                  |      S )z}
        Build an instance of ParticipantConversationInstance

        :param payload: Payload response from the API
        )r   _version)r9   r#   s     r    get_instancez(ParticipantConversationPage.get_instancee   s     /t}}gFFr   c                      y)r=   z5<Twilio.Conversations.V1.ParticipantConversationPage>r   r>   s    r    r?   z$ParticipantConversationPage.__repr__m        Gr   N)	r   r   r   r   rA   r   r   rH   r?   r   r   r    rE   rE   c   s/    GDcN G7V GG# Gr   rE   c                       e Zd Zdef fdZej                  ej                  ddfdeee	f   deee	f   de
e   de
e   dee   f
d	Zej                  ej                  ddfdeee	f   deee	f   de
e   de
e   dee   f
d
Zej                  ej                  ddfdeee	f   deee	f   de
e   de
e   dee   f
dZej                  ej                  ddfdeee	f   deee	f   de
e   de
e   dee   f
dZej                  ej                  ej                  ej                  ej                  fdeee	f   d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                  ej                  fdeee	f   d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fdZ xZS )ParticipantConversationListr"   c                 2    t         |   |       d| _        y)zy
        Initialize the ParticipantConversationList

        :param version: Version that contains the resource

        z/ParticipantConversationsN)r5   r6   _uri)r9   r"   r:   s     r    r6   z$ParticipantConversationList.__init__x   s     	!/	r   Nidentityaddresslimit	page_sizer;   c                     | j                   j                  ||      }| j                  |||d         }| j                   j                  ||d         S )a  
        Streams ParticipantConversationInstance 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 str identity: A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
        :param str address: A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.
        :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
        rR   rO   rP   rR   rQ   )rG   read_limitspagestreamr9   rO   rP   rQ   rR   limitsrV   s          r    rW   z"ParticipantConversationList.stream   sV    0 **5)<yyw&:M  
 }}##D&/::r   c                    K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams ParticipantConversationInstance 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 str identity: A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
        :param str address: A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.
        :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
        rR   rT   NrQ   )rG   rU   
page_asyncstream_asyncrX   s          r    r\   z(ParticipantConversationList.stream_async   sd     0 **5)<__w&:M % 
 
 }}))$w@@	
s   7AA$Ac                 >    t        | j                  ||||            S )a)  
        Lists ParticipantConversationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str identity: A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
        :param str address: A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.
        :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
        rO   rP   rQ   rR   )listrW   )r9   rO   rP   rQ   rR   s        r    r_   z ParticipantConversationList.list   s.    . KK!#	  
 	
r   c                 ~   K   | j                  ||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a8  
        Asynchronously lists ParticipantConversationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str identity: A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
        :param str address: A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.
        :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\   )r9   rO   rP   rQ   rR   records         r    
list_asyncz&ParticipantConversationList.list_async   sZ     2 '+&7&7!#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=
page_tokenpage_numberc                     t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Retrieve a single page of ParticipantConversationInstance records from the API.
        Request is executed immediately

        :param identity: A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
        :param address: A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.
        :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 ParticipantConversationInstance
        IdentityAddress	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofrG   rV   rN   rE   	r9   rO   rP   rc   rd   rR   datart   responses	            r    rV   z ParticipantConversationList.page  s    ( yy$"'#%
 ))^-PQR.==%%diig & 
 +4==(CCr   c                 
  K   t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously retrieve a single page of ParticipantConversationInstance records from the API.
        Request is executed immediately

        :param identity: A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
        :param address: A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.
        :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 ParticipantConversationInstance
        rf   rk   rl   rm   rn   ro   rp   N)r   ru   rG   r[   rN   rE   rv   s	            r    r[   z&ParticipantConversationList.page_async)  s     ( yy$"'#%
 ))^-PQR.11diig 2 
 
 +4==(CC
s   A$B&B'B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )a  
        Retrieve a specific page of ParticipantConversationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ParticipantConversationInstance
        ro   )rG   domaintwiliorequestrE   r9   rz   rx   s      r    get_pagez$ParticipantConversationList.get_pageP  s7     ==''..66ujI*4==(CCr   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a"  
        Asynchronously retrieve a specific page of ParticipantConversationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ParticipantConversationInstance
        ro   N)rG   r|   r}   request_asyncrE   r   s      r    get_page_asyncz*ParticipantConversationList.get_page_async\  sD      --44BB5*UU*4==(CC Vs   4AAAc                      y)r=   z5<Twilio.Conversations.V1.ParticipantConversationList>r   r>   s    r    r?   z$ParticipantConversationList.__repr__h  rJ   r   )r   r   r   r   r6   r   unsetr   rA   r@   r   intr	   r   rW   r
   r\   r   r_   rb   rE   rV   r[   r   r   r?   rB   rC   s   @r    rL   rL   v   s3   	0 	0 (.||&,ll##';V$; sF{#; }	;
 C=; 
1	2;B (.||&,ll##'AV$A sF{#A }	A
 C=A 
6	7AB (.||&,ll##'
V$
 sF{#
 }	

 C=
 
-	.
D (.||&,ll##'
V$
 sF{#
 }	

 C=
 
-	.
F (.||&,ll)/*0,,(.%DV$%D sF{#%D #v+&	%D
 3;'%D f%%D 
%%DR (.||&,ll)/*0,,(.%DV$%D sF{#%D #v+&	%D
 3;'%D f%%D 
%%DN
D3 
D+F 
D
Ds 
D7R 
DG# Gr   rL   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rE   rL   r   r   r    <module>r      sW     L L L + : 2 ' !GK&6 GKTG$ G&xG, xGr   