
    d{iz                         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 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)ApiResponse)InstanceResource)ListResource)Version)Pagec                   Z     e Zd Z G d de      Z	 dedeeef   de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     {/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/conversations/v1/service/participant_conversation.pyStater      s    r    r"   versionpayloadchat_service_sidc                 B   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      | _        d|i| _        y )Naccount_sidr%   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_datetimer0   r1   r2   r3   r4   r5   	_solution)selfr#   r$   r%   	__class__s       r!   r7   z(ParticipantConversationInstance.__init__4   s    	!*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
  0
r    returnc                     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;ParticipantConversationInstance.__repr__.<locals>.<genexpr>f   s     SDAq7>>!Q/Ss   !z<<Twilio.Conversations.V1.ParticipantConversationInstance {}>)joinr:   itemsrB   )r;   contexts     r!   __repr__z(ParticipantConversationInstance.__repr__`   s;     ((SDNN<P<P<RSSMTT
 	
r    )r   r   r   objectr"   r   r   strr   r7   rJ   __classcell__r<   s   @r!   r   r      sF     
&*
*
)-c3h*
KN*
X	
# 	
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                 L    t        | j                  || j                  d         S )z}
        Build an instance of ParticipantConversationInstance

        :param payload: Payload response from the API
        r%   )r%   )r   _versionr:   )r;   r$   s     r!   get_instancez(ParticipantConversationPage.get_instancen   s&     /MM7T^^DV5W
 	
r    c                      y)r?   z5<Twilio.Conversations.V1.ParticipantConversationPage>r   r;   s    r!   rJ   z$ParticipantConversationPage.__repr__x        Gr    N)	r   r   r   r   rL   r   r   rS   rJ   r   r    r!   rP   rP   l   s,    
DcN 
7V 
G# Gr    rP   c                       e Zd Zde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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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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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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#   r%   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)a;  
        Initialize the ParticipantConversationList

        :param version: Version that contains the resource
        :param chat_service_sid: The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant Conversations resource is associated with.

        r%   z5/Services/{chat_service_sid}/ParticipantConversationsNr   )r6   r7   r:   rB   _uri)r;   r#   r%   r<   s      r!   r7   z$ParticipantConversationList.__init__   sG     	!  0
 SKRR 
nn
	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
        r^   r[   r\   r^   r]   )rR   read_limitspagestreamr;   r[   r\   r]   r^   limitsrb   s          r!   rc   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
        r^   r`   Nr]   )rR   ra   
page_asyncstream_asyncrd   s          r!   rh   z(ParticipantConversationList.stream_async   sd     0 **5)<__w&:M % 
 
 }}))$w@@	
s   7AA$Ac                     | j                   j                  ||      }| j                  |||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams ParticipantConversationInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r^   r`   r]   )rR   ra   page_with_http_inforc   datastatus_codeheadersr;   r[   r\   r]   r^   re   page_response	generators           r!   stream_with_http_infoz1ParticipantConversationList.stream_with_http_info   sv    , **5)<00w&:M 1 
 MM((););VG_M	=44m6K6KLLr    c                   K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams ParticipantConversationInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r^   r`   Nr]   )rR   ra   page_with_http_info_asyncrh   rk   rl   rm   rn   s           r!   stream_with_http_info_asyncz7ParticipantConversationList.stream_with_http_info_async   s     , **5)<"<<w&:M = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   7BB AB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
        r[   r\   r]   r^   )listrc   )r;   r[   r\   r]   r^   s        r!   rw   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
        rv   N)rh   )r;   r[   r\   r]   r^   records         r!   
list_asyncz&ParticipantConversationList.list_async/  sZ     2 '+&7&7!#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=c                 f    | j                  ||||      \  }}}t        |      }t        |||      S )a  
        Lists ParticipantConversationInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        rv   rk   rl   rm   )rq   rw   r   )	r;   r[   r\   r]   r^   rp   rl   rm   rH   s	            r!   list_with_http_infoz/ParticipantConversationList.list_with_http_infoP  sG    , +/*D*D	 +E +
'	; Y;PPr    c                    K   | j                  ||||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }	}t        |	||      S w)a  
        Asynchronously lists ParticipantConversationInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        rv   Nr|   )rt   r   )
r;   r[   r\   r]   r^   rp   rl   rm   ry   rH   s
             r!   list_with_http_info_asyncz5ParticipantConversationList.list_with_http_info_asynco  sl     , 150P0P	 1Q 1
 +
'	; -666&+
 7666;PPs4   A6A<:8
:<A:<A
page_tokenpage_numberc                    t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || 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paramsrm   )r   ofrR   rb   rZ   rP   r:   	r;   r[   r\   r   r   r^   rk   rm   responses	            r!   rb   z ParticipantConversationList.page  s    ( yy$"'#%
 ))^-PQR.==%%diig & 
 +4==(DNNSSr    c                    K   t        j                  |||||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 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
        r   r   r   r   r   r   r   N)r   r   rR   rg   rZ   rP   r:   r   s	            r!   rg   z&ParticipantConversationList.page_async  s     ( yy$"'#%
 ))^-PQR.11diig 2 
 
 +4==(DNNSS
s   A$B&B'&Bc                 (   t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}	}
t        | j                  || j                        }t        ||	|
      S )	a  
        Retrieve a single page with response metadata


        :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: ApiResponse with ParticipantConversationPage, status code, and headers
        r   r   r   r   r   r   r   r|   )r   r   rR   page_with_response_inforZ   rP   r:   r   r;   r[   r\   r   r   r^   rk   rm   r   rl   response_headersrb   s               r!   rj   z/ParticipantConversationList.page_with_http_info  s    ( yy$"'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ +4==(DNNS+GWXXr    c                 D  K   t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}	}
t        | j                  || j                        }t        ||	|
	      S 7 7w)
a  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with ParticipantConversationPage, status code, and headers
        r   r   r   r   r   r   r   Nr|   )r   r   rR   page_with_response_info_asyncrZ   rP   r:   r   r   s               r!   rs   z5ParticipantConversationList.page_with_http_info_async  s     ( yy$"'#%
 ))^-PQR. --==$))D' >   	0+/
 +4==(DNNS+GWXXs   A$B &B'8B 
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || 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
        r   )rR   domaintwiliorequestrP   r:   r;   r   r   s      r!   get_pagez$ParticipantConversationList.get_page.  s=     ==''..66ujI*4==(DNNSSr    c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || 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
        r   N)rR   r   r   request_asyncrP   r:   r   s      r!   get_page_asyncz*ParticipantConversationList.get_page_async:  sJ      --44BB5*UU*4==(DNNSS Vs   4AA&Ac                      y)r?   z5<Twilio.Conversations.V1.ParticipantConversationList>r   rU   s    r!   rJ   z$ParticipantConversationList.__repr__F  rV   r    )#r   r   r   r   rL   r7   r   unsetr   rK   r   intr	   r   rc   r
   rh   tuplerq   rt   r   rw   rz   r   r}   r   rP   rb   rg   rj   rs   r   r   rJ   rM   rN   s   @r!   rX   rX      s   
 
3 
( (.||&,ll##';V$; sF{#; }	;
 C=; 
1	2;B (.||&,ll##'AV$A sF{#A }	A
 C=A 
6	7AB (.||&,ll##'MV$M sF{#M }	M
 C=M 
M@ (.||&,ll##'MV$M sF{#M }	M
 C=M 
M@ (.||&,ll##'
V$
 sF{#
 }	

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

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