
    d{il                         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 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)ApiResponse)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def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     f/home/sas/my/fyp/ringai/.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    r7   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!   
RoomStatusr9   -   s    #		%r    rB   c                   4    e 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gllN)r   r   r   US1US2AU1BR1IE1JP1SG1IN1DE1GLLr   r    r!   TwilioRealmrD   3   s4    r    rY   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 )Nr]   participant_identity	join_time
leave_timeduration_secaccount_sidr\   statuscodecs
end_reason
error_codeerror_code_urlmedia_region
propertiesedge_locationpublisher_infourlr\   r]   )super__init__getr]   r_   r   iso8601_datetimer`   ra   rb   rc   r\   rd   re   rf   integerrg   rh   ri   rj   rk   rl   rm   	_solution_context)selfrZ   r[   r\   r]   	__class__s        r!   rp   zParticipantInstance.__init__S   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
        r\   r]   rn   )ru   ParticipantContext_versionrt   rv   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!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the ParticipantInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r}   fetch_with_http_infor|   s    r!   r   z(ParticipantInstance.fetch_with_http_info   s     {{//11r    c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the ParticipantInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r}   fetch_with_http_info_asyncr|   s    r!   r   z.ParticipantInstance.fetch_with_http_info_async   s!      [[;;====r   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>        SDAq7>>!Q/S   !z+<Twilio.Insights.V1.ParticipantInstance {}>joinrt   itemsr   rv   contexts     r!   __repr__zParticipantInstance.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr    )N)rx   rz   )rx   r   )r   r   r   objectr"   r7   rB   rY   r   r   strr   r   rp   propertyr}   r   r   r   r   r   r   __classcell__rw   s   @r!   r   r      s     	v 	&V &
f 
2 *.';'; c3h'; 	';
 "#';R  #/2k 2>+ >M# Mr    r   c                        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defd	Zdefd
Zde
fdZdefdZ xZS )rz   rZ   r\   r]   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.
        rn   z6/Video/Rooms/{room_sid}/Participants/{participant_sid}Nr   ro   rp   rt   r   _uri)rv   rZ   r\   r]   rw   s       r!   rp   zParticipantContext.__init__   sG     	! !.
 TLSS 
nn
	r    rx   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r   ofr{   fetch_with_response_infor   rv   r   s     r!   _fetchzParticipantContext._fetch   sB     ))B-.}}55dii 6 
 	
r    c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )r   r\   r]   rn   )r   r   r{   rt   rv   r[   _s      r!   r   zParticipantContext.fetch   sE     A"MM^^J/ NN+<=	
 	
r    c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the ParticipantInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r\   r]   rn   datastatus_coder   )r   r   r{   rt   r   rv   r[   r   r   instances        r!   r   z'ParticipantContext.fetch_with_http_info   sT     )-%g&MM^^J/ NN+<=	
 k7SSr    c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   r   N)r   r   r{   fetch_with_response_info_asyncr   r   s     r!   _fetch_asynczParticipantContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)r   Nr\   r]   rn   )r   r   r{   rt   r   s      r!   r   zParticipantContext.fetch_async  sT      #//11A"MM^^J/ NN+<=	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the ParticipantInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr\   r]   rn   r   )r   r   r{   rt   r   r   s        r!   r   z-ParticipantContext.fetch_with_http_info_async  sd      /3.?.?.A(A%g&MM^^J/ NN+<=	
 k7SS )Bs   A"A A
A"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>3  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   rp   tupler   r   r   r   r   r   r   r   r   r   r   s   @r!   rz   rz      sy    
 
3 
 
&
 
 
* 
Tk T 
E 
 
#6 
T+ T L# Lr    rz   c                   2    e Zd Zdeeef   defdZdefdZy)ParticipantPager[   rx   c                 L    t        | j                  || j                  d         S )zq
        Build an instance of ParticipantInstance

        :param payload: Payload response from the API
        r\   )r\   )r   r{   rt   )rv   r[   s     r!   get_instancezParticipantPage.get_instance9  s%     #MM7T^^J-G
 	
r    c                      y)r   z$<Twilio.Insights.V1.ParticipantPage>r   r|   s    r!   r   zParticipantPage.__repr__C       6r    N)	r   r   r   r   r   r   r   r   r   r   r    r!   r   r   7  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fd	Z	 	 ddee   dee   d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fdZ	 	 ddee   dee   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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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 )ParticipantListrZ   r\   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.

        r\   z$/Video/Rooms/{room_sid}/ParticipantsNr   r   )rv   rZ   r\   rw   s      r!   rp   zParticipantList.__init__N  sA     	! 
 B:AASDNNS	r    limit	page_sizerx   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rv   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_asyncw  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams ParticipantInstance and returns headers from first page


        :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   )r{   r   page_with_http_infor   r   r   r   rv   r   r   r   page_response	generators         r!   stream_with_http_infoz%ParticipantList.stream_with_http_info  sk    $ **5)<006+;N0O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 ParticipantInstance and returns headers from first page


        :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   )r{   r   page_with_http_info_asyncr   r   r   r   r   s         r!   stream_with_http_info_asyncz+ParticipantList.stream_with_http_info_async  s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB 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   )rv   r   r   s      r!   r   zParticipantList.list  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   )rv   r   r   records       r!   
list_asynczParticipantList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists ParticipantInstance and returns headers from first page


        :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
        r   r   )r   r   r   )rv   r   r   r   r   r   r   s          r!   list_with_http_infoz#ParticipantList.list_with_http_info  sA    $ +/*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 ParticipantInstance and returns headers from first page


        :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
        r   Nr   )r   r   )rv   r   r   r   r   r   r   r   s           r!   list_with_http_info_asyncz)ParticipantList.list_with_http_info_async  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8: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 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   rt   rv   r   r   r   r   r   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   rt   r   s          r!   r   zParticipantList.page_asyncJ  s       yy'#%
 ))^-PQR.11diig 2 
 
 t}}hGG
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 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 ParticipantPage, status code, and headers
        r   r   r   r   r   r   r   r   )r   r   r{   page_with_response_infor   r   rt   r   
rv   r   r   r   r   r   r   r   response_headersr   s
             r!   r   z#ParticipantList.page_with_http_infok  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ t}}hG+GWXXr    c                 @  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  || j                        }	t        |	||	      S 7 7w)
al  
        Asynchronously retrieve a single page with response metadata


        :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 ParticipantPage, status code, and headers
        r   r   r   r   r   r   r   Nr   )r   r   r{   page_with_response_info_asyncr   r   rt   r   r   s
             r!   r   z)ParticipantList.page_with_http_info_async  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 t}}hG+GWXXs   A"B$B%8B
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   rt   rv   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   rt   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r]   c                 L    t        | j                  | j                  d   |      S zw
        Constructs a ParticipantContext

        :param participant_sid: The SID of the Participant resource.
        r\   rn   rz   r{   rt   rv   r]   s     r!   rq   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   rp   r   intr	   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   unsetr   r   r   r   r   r   r   r  r  rz   rq   r  r   r   r   s   @r!   r   r   L  s   T T3 T$  $#';}; C=; 
%	&	;6  $#'A}A C=A 
*	+	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
!	"	
8  $#'
}
 C=
 
!	"	
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	H#v+&H 3;'H f%	H
 
HF *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
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.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rz   r   r   r   r    r!   <module>r     sj     L L L + 0 8 : 2 ' !]M* ]M@zL zLz6d 6*[6l [6r    