
    gI                         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 G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Insights
    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)InstanceContext)InstanceResource)ListResource)Version)Pagec            
            e Zd Z G d de      Z G d de      Z G d de      Z G d de      Z	 	 dd	ed
e	e
ef   de
dee
   f fdZedd       ZddZddZde
fdZ xZS )ParticipantInstancec                       e Zd ZdZdZdZdZy)ParticipantInstance.CodecVP8H264VP9opusN)__name__
__module____qualname__r   r   r   OPUS     e/var/www/html/Manimaran/venv/lib/python3.12/site-packages/twilio/rest/insights/v1/room/participant.pyCodecr      s    r   r!   c                   0    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zy
) ParticipantInstance.EdgeLocationashburndublin	frankfurt	singaporesydney	sao_pauloroamingumatillatokyoN)r   r   r   ASHBURNDUBLIN	FRANKFURT	SINGAPORESYDNEY	SAO_PAULOROAMINGUMATILLATOKYOr   r   r    EdgeLocationr#   !   s/    			r   r6   c                       e Zd ZdZdZdZdZy)ParticipantInstance.RoomStatusin_progress	connected	completeddisconnectedN)r   r   r   IN_PROGRESS	CONNECTED	COMPLETEDDISCONNECTEDr   r   r    
RoomStatusr8   ,   s    #		%r   rA   c                   d    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZy)ParticipantInstance.TwilioRealmus1us2au1br1ie1jp1sg1in1de1gll	stage_us1dev_us1	stage_au1	stage_sg1	stage_br1	stage_in1	stage_jp1	stage_de1	stage_ie1	stage_us2dev_us2outsideN)r   r   r   US1US2AU1BR1IE1JP1SG1IN1DE1GLL	STAGE_US1DEV_US1	STAGE_AU1	STAGE_SG1	STAGE_BR1	STAGE_IN1	STAGE_JP1	STAGE_DE1	STAGE_IE1	STAGE_US2DEV_US2OUTSIDEr   r   r    TwilioRealmrC   2   sp    									r   rp   versionpayloadroom_sidparticipant_sidc                    t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        ||xs | j                  d| _        d | _        y )Nrt   participant_identity	join_time
leave_timeduration_secaccount_sidrs   statuscodecs
end_reason
error_codeerror_code_urlmedia_region
propertiesedge_locationpublisher_infourlrs   rt   )super__init__getrt   rv   r   iso8601_datetimerw   rx   ry   rz   rs   r{   r|   r}   integerr~   r   r   r   r   r   r   	_solution_context)selfrq   rr   rs   rt   	__class__s        r    r   zParticipantInstance.__init__^   s    	!.5kk:K.L3:;;?U3V!-8-I-IKK$.
 /:.J.JKK%/
 ,3;;~+F*1++m*D'.{{:'>BI++hBWCJ;;xCX)0\)B)4)<)<W[[=V)W-4[[9I-JIPJ
 8?{{<7PKR;;L
 <C;;GW;X")++e"4 !.F$2F2F
 7;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: ParticipantContext for this ParticipantInstance
        rs   rt   r   )r   ParticipantContext_versionr   r   s    r    _proxyzParticipantInstance._proxy   sF     == .
3 $/@ ADM
 }}r   c                 6    | j                   j                         S )c
        Fetch the ParticipantInstance


        :returns: The fetched ParticipantInstance
        )r   fetchr   s    r    r   zParticipantInstance.fetch   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the ParticipantInstance


        :returns: The fetched ParticipantInstance
        N)r   fetch_asyncr   s    r    r   zParticipantInstance.fetch_async   s!      [[,,....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/ParticipantInstance.__repr__.<locals>.<genexpr>   "     S<RDAq7>>!Q/<R   !z+<Twilio.Insights.V1.ParticipantInstance {}>joinr   itemsr   r   contexts     r    __repr__zParticipantInstance.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr   )N)r   r   )r   r   )r   r   r   objectr!   r6   rA   rp   r   r   strr   r   r   propertyr   r   r   r   __classcell__r   s   @r    r   r      s     	v 	&V &f 02 *.';'; c3h'; 	';
 "#';R  #/M# Mr   r   c                   P     e Zd Z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	 xZ
S )	r   rq   rs   rt   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the ParticipantContext

        :param version: Version that contains the resource
        :param room_sid: The SID of the Room resource.
        :param participant_sid: The SID of the Participant resource.
        r   z6/Video/Rooms/{room_sid}/Participants/{participant_sid}Nr   r   r   r   r   _uri)r   rq   rs   rt   r   s       r    r   zParticipantContext.__init__   sG     	! !.
 TLSS 
nn
	r   r   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )r   application/jsonAcceptGETmethoduriheadersrs   rt   r   )r   ofr   r   r   r   r   r   r   rr   s      r    r   zParticipantContext.fetch   sj     ))B-.--%%U		7%S"MM^^J/ NN+<=	
 	
r   c                   K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)	r   r   r   r   r   Nrs   rt   r   )r   r   r   r   r   r   r   r   s      r    r   zParticipantContext.fetch_async   s      ))B-.11dii 2 
 
 #MM^^J/ NN+<=	
 	
	
s   ABB 	8Bc                     dj                  d | j                  j                         D              }dj                  |      S )r   r   c              3   F   K   | ]  \  }}d j                  ||        ywr   r   r   s      r    r   z.ParticipantContext.__repr__.<locals>.<genexpr>   r   r   z*<Twilio.Insights.V1.ParticipantContext {}>r   r   s     r    r   zParticipantContext.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr   )r   r   r   r   r   r   r   r   r   r   r   r   s   @r    r   r      sE    
 
3 
 
&
* 
*
#6 
.L# Lr   r   c                   2    e Zd Zdeeef   defdZdefdZy)ParticipantPagerr   r   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of ParticipantInstance

        :param payload: Payload response from the API
        rs   )rs   )r   r   r   )r   rr   s     r    get_instancezParticipantPage.get_instance   s%     #MM7T^^J-G
 	
r   c                      y)r   z$<Twilio.Insights.V1.ParticipantPage>r   r   s    r    r   zParticipantPage.__repr__
       6r   N)	r   r   r   r   r   r   r   r   r   r   r   r    r   r      s*    
DcN 
7J 
6# 6r   r   c            	           e Zd Zdedef fdZ	 	 ddee   dee   dee	   fdZ
	 	 ddee   dee   dee	   fdZ	 	 ddee   dee   dee	   fd	Z	 	 ddee   dee   dee	   fd
Zej"                  ej"                  ej"                  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"                  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 )ParticipantListrq   rs   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the ParticipantList

        :param version: Version that contains the resource
        :param room_sid: The SID of the Room resource.

        rs   z$/Video/Rooms/{room_sid}/ParticipantsNr   r   )r   rq   rs   r   s      r    r   zParticipantList.__init__  sA     	! 
 B:AASDNNS	r   limit	page_sizer   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )aa  
        Streams ParticipantInstance 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 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   read_limitspagestreamr   r   r   limitsr   s        r    r   zParticipantList.stream%  sJ    ( **5)<yy6+#6y7}}##D&/::r   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ap  
        Asynchronously streams ParticipantInstance 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 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   )r   r   
page_asyncstream_asyncr   s        r    r   zParticipantList.stream_async>  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists ParticipantInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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   )listr   )r   r   r   s      r    r   zParticipantList.listW  s(    & KK#  
 	
r   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists ParticipantInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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   records       r    
list_asynczParticipantList.list_asyncq  sY     * '+&7&7# '8 ' ! !
 
 !
 
 	
 
s0   ;.;620
26;26;
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 ParticipantInstance records from the API.
        Request is executed immediately

        :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 ParticipantInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedr   r   r   r   r   paramsr   )r   r   r   r   r   r   r   r   r   r   r   datar   responses          r    r   zParticipantList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 t}}hGGr   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 ParticipantInstance records from the API.
        Request is executed immediately

        :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 ParticipantInstance
        r   r   r   r   r   r   r   N)r   r   r   r   r   r   r   r   s          r    r   zParticipantList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}hGG
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of ParticipantInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ParticipantInstance
        r   )r   domaintwiliorequestr   r   r   r   r   s      r    get_pagezParticipantList.get_page  s=     ==''..66ujIt}}hGGr   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a
  
        Asynchronously retrieve a specific page of ParticipantInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ParticipantInstance
        r   N)r   r   r   request_asyncr   r   r   s      r    get_page_asynczParticipantList.get_page_async  sJ      --44BB5*UUt}}hGG Vs   4AA&Art   c                 L    t        | j                  | j                  d   |      S zw
        Constructs a ParticipantContext

        :param participant_sid: The SID of the Participant resource.
        rs   r   r   r   r   r   rt   s     r    r   zParticipantList.get  '     "MM^^J/+
 	
r   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r    __call__zParticipantList.__call__  r   r   c                      y)r   z$<Twilio.Insights.V1.ParticipantList>r   r   s    r    r   zParticipantList.__repr__  r   r   )NN)r   r   r   r   r   r   r   intr	   r   r   r
   r   r   r   r   r   unsetr   r   r   r   r   r   r   r   r   r   r   r   r   s   @r    r   r     s   T T3 T$  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
: *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	H#v+&H 3;'H f%	H
 
HB
H3 
H? 
H
Hs 
H 
H

3 

+= 



 

0B 

6# 6r   r   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r   r   r   r   r   r    <module>r
     sg     L L L + 8 : 2 ' !WM* WMtHL HLV6d 6*q6l q6r   