
    pid                         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 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ej&                  ej&                  fdeeef   deeef   dd fdZej&                  ej&                  fdeeef   deeef   dd fdZdefdZ xZS )ConferenceParticipantInstancec                       e Zd ZdZdZy)+ConferenceParticipantInstance.CallDirectioninboundoutboundN)__name__
__module____qualname__INBOUNDOUTBOUND     {/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/insights/v1/conference/conference_participant.pyCallDirectionr      s    r   r    c                   (    e Zd ZdZdZdZdZdZdZdZ	y)	(ConferenceParticipantInstance.CallStatusanswered	completedbusyfailnoanswerringingcanceledN)
r   r   r   ANSWERED	COMPLETEDBUSYFAILNOANSWERRINGINGCANCELEDr   r   r   
CallStatusr"      s%    	r   r1   c                       e Zd ZdZdZdZy)&ConferenceParticipantInstance.CallTypecarrierclientsipN)r   r   r   CARRIERCLIENTSIPr   r   r   CallTyper3   (   s    r   r:   c                       e Zd ZdZdZdZdZy).ConferenceParticipantInstance.JitterBufferSizelargesmallmediumoffN)r   r   r   LARGESMALLMEDIUMOFFr   r   r   JitterBufferSizer<   -   s    r   rE   c                       e Zd ZdZdZdZy)-ConferenceParticipantInstance.ProcessingStatecompletein_progresstimeoutN)r   r   r   COMPLETEIN_PROGRESSTIMEOUTr   r   r   ProcessingStaterG   3   s    #r   rN   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
)$ConferenceParticipantInstance.Regionus1us2au1br1ie1jp1sg1de1in1N)r   r   r   US1US2AU1BR1IE1JP1SG1DE1IN1r   r   r   RegionrP   8   s/    r   rc   versionpayloadconference_sidparticipant_sidc                    t         |   |       |j                  d      | _        |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            | _        t        j$                  |j                  d            | _        t        j$                  |j                  d            | _        t        j$                  |j                  d            | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _         ||xs | j                  d| _!        d | _"        y )Nrg   labelrf   call_sidaccount_sidcall_directionfromtocall_statuscountry_codeis_moderator	join_time
leave_timeduration_secondsoutbound_queue_lengthoutbound_time_in_queuejitter_buffer_sizeis_coachcoached_participantsparticipant_regionconference_region	call_typeprocessing_state
propertieseventsmetricsurlrf   rg   )#super__init__getrg   ri   rf   rj   rk   rl   _fromrn   ro   rp   rq   r   iso8601_datetimerr   rs   integerrt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   	_solution_context)selfrd   re   rf   rg   	__class__s        r   r   z&ConferenceParticipantInstance.__init__a   s|    	!.5kk:K.L$+KK$8
-4[[9I-J'.{{:'>*1++m*DKK() 	 %,KK$7
!(T!2KK& 	 ,3;;~+F,3KK,G-8-I-IKK$.
 /:.J.JKK%/
 0;/B/BKK*+0
 5@4G4GKK/05
" 6A5H5HKK016
#
 KK,- 	 )0J(?9@":
! KK,- 	 KK+, 	 KK$ 	
 KK*+ 	 8?{{<7P3:;;x3H4;KK	4J")++e"4 -.F$2F2F
 AEr   returnc                     | j                   7t        | j                  | j                  d   | j                  d         | _         | j                   S )a  
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: ConferenceParticipantContext for this ConferenceParticipantInstance
        rf   rg   r   )r   ConferenceParticipantContext_versionr   r   s    r   _proxyz$ConferenceParticipantInstance._proxy   sG     == 8#~~.>? $/@ ADM
 }}r   r   r   c                 <    | j                   j                  ||      S )7  
        Fetch the ConferenceParticipantInstance

        :param events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :param metrics: Object. Contains participant call quality metrics.

        :returns: The fetched ConferenceParticipantInstance
        r   r   )r   fetchr   r   r   s      r   r   z#ConferenceParticipantInstance.fetch   s&     {{   ! 
 	
r   c                 X   K   | j                   j                  ||       d{   S 7 w)Q  
        Asynchronous coroutine to fetch the ConferenceParticipantInstance

        :param events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :param metrics: Object. Contains participant call quality metrics.

        :returns: The fetched ConferenceParticipantInstance
        r   N)r   fetch_asyncr   s      r   r   z)ConferenceParticipantInstance.fetch_async   s4      [[,, - 
 
 	
 
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>z9ConferenceParticipantInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z5<Twilio.Insights.V1.ConferenceParticipantInstance {}>joinr   itemsr   r   contexts     r   __repr__z&ConferenceParticipantInstance.__repr__   s6     ((SDNN<P<P<RSSFMMgVVr   )N)r   r   )r   r   r   objectr    r1   r:   rE   rN   rc   r   r   strr   r   r   propertyr   r   unsetr   r   r   r   __classcell__r   s   @r   r   r      s@    V 6 
6 & 
	 	F *.CECE c3hCE 	CE
 "#CEJ  " &,\\&,ll
c6k"
 sF{#
 
)	
( &,\\&,ll
c6k"
 sF{#
 
)	
$W# Wr   r   c                        e Zd Zdededef fdZej                  ej                  fdeee	f   deee	f   de
fdZej                  ej                  fdeee	f   deee	f   de
fd	Zdefd
Z xZS )r   rd   rf   rg   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the ConferenceParticipantContext

        :param version: Version that contains the resource
        :param conference_sid: The unique SID identifier of the Conference.
        :param participant_sid: The unique SID identifier of the Participant.
        r   z</Conferences/{conference_sid}/Participants/{participant_sid}Nr   r   r   r   r   _uri)r   rd   rf   rg   r   s       r   r   z%ConferenceParticipantContext.__init__   sJ     	! -.

 RJQQ .. 		r   r   r   r   c                    t        j                  ||d      }t        j                  i       }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d         S )	r   EventsMetricsapplication/jsonAcceptGETmethoduriparamsheadersrf   rg   r   )r   ofr   r   r   r   r   r   r   r   r   r   re   s         r   r   z"ConferenceParticipantContext.fetch   s      "
 ))B-.--%%dii & 
 -MM>>*:; NN+<=	
 	
r   c                 :  K   t        j                  ||d      }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   r   Nrf   rg   r   )r   r   r   r   r   r   r   r   s         r   r   z(ConferenceParticipantContext.fetch_async  s       "
 ))B-.11dii 2 
 
 -MM>>*:; 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   z8ConferenceParticipantContext.__repr__.<locals>.<genexpr>I  r   r   z4<Twilio.Insights.V1.ConferenceParticipantContext {}>r   r   s     r   r   z%ConferenceParticipantContext.__repr__C  s6     ((SDNN<P<P<RSSELLWUUr   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r      s    
 
 
s 
. &,\\&,ll"
c6k""
 sF{#"
 
'	"
L &,\\&,ll"
c6k""
 sF{#"
 
'	"
HV# Vr   r   c                   2    e Zd Zdeeef   defdZdefdZy)ConferenceParticipantPagere   r   c                 L    t        | j                  || j                  d         S )z{
        Build an instance of ConferenceParticipantInstance

        :param payload: Payload response from the API
        rf   )rf   )r   r   r   )r   re   s     r   get_instancez&ConferenceParticipantPage.get_instanceO  s&     -MM74>>BR3S
 	
r   c                      y)r   z.<Twilio.Insights.V1.ConferenceParticipantPage>r   r   s    r   r   z"ConferenceParticipantPage.__repr__Y       @r   N)	r   r   r   r   r   r   r   r   r   r   r   r   r   r   M  s,    
DcN 
7T 
@# @r   r   c                       e Zd Zdedef fdZej                  ej                  ej                  ddfdeee	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                  ddfdeee	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                  ddfdeee	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                  ddfdeee	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                  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ee	f   d
efdZej                  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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 )ConferenceParticipantListrd   rf   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the ConferenceParticipantList

        :param version: Version that contains the resource
        :param conference_sid: The unique SID identifier of the Conference.

        rf   z*/Conferences/{conference_sid}/ParticipantsNr   r   )r   rd   rf   r   s      r   r   z"ConferenceParticipantList.__init__d  sF     	! n
 H@GG 
nn
	r   Nrg   ri   r   limit	page_sizer   c                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  ||d         S )ax  
        Streams ConferenceParticipantInstance 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 participant_sid: The unique SID identifier of the Participant.
        :param str label: User-specified label for a participant.
        :param str events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :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   rg   ri   r   r   r   )r   read_limitspagestreamr   rg   ri   r   r   r   limitsr   s           r   r   z ConferenceParticipantList.streamv  s[    4 **5)<yy+[)	  
 }}##D&/::r   c                    K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams ConferenceParticipantInstance 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 participant_sid: The unique SID identifier of the Participant.
        :param str label: User-specified label for a participant.
        :param str events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :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&ConferenceParticipantList.stream_async  si     4 **5)<__+[)	 % 
 
 }}))$w@@
s   8A A$A c           	      @    t        | j                  |||||            S )a  
        Lists ConferenceParticipantInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str participant_sid: The unique SID identifier of the Participant.
        :param str label: User-specified label for a participant.
        :param str events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :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
        rg   ri   r   r   r   )listr   )r   rg   ri   r   r   r   s         r   r   zConferenceParticipantList.list  s1    2 KK /#  
 	
r   c                    K   | j                  |||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a$  
        Asynchronously lists ConferenceParticipantInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str participant_sid: The unique SID identifier of the Participant.
        :param str label: User-specified label for a participant.
        :param str events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :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   rg   ri   r   r   r   records          r   
list_asyncz$ConferenceParticipantList.list_async  s]     6 '+&7&7 /# '8 ' !	
 	
 !	
 	
 		
 	
s0   >1>953
59>59>
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 ConferenceParticipantInstance records from the API.
        Request is executed immediately

        :param participant_sid: The unique SID identifier of the Participant.
        :param label: User-specified label for a participant.
        :param events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :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 ConferenceParticipantInstance
        ParticipantSidLabelr   	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedr   r   r   r   )r   r   r   r   r   r   r   
r   rg   ri   r   r   r   r   datar   responses
             r   r   zConferenceParticipantList.page  s    , yy"1 '#%	
 ))^-PQR.==%%diig & 
 )$..QQr   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 ConferenceParticipantInstance records from the API.
        Request is executed immediately

        :param participant_sid: The unique SID identifier of the Participant.
        :param label: User-specified label for a participant.
        :param events: Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc.
        :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 ConferenceParticipantInstance
        r   r   r   r   r   r   r   N)r   r   r   r   r   r   r   r   s
             r   r   z$ConferenceParticipantList.page_async/  s     , yy"1 '#%	
 ))^-PQR.11diig 2 
 
 )$..QQ
s   A%B'B(&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )a  
        Retrieve a specific page of ConferenceParticipantInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ConferenceParticipantInstance
        r   )r   domaintwiliorequestr   r   r   r   r   s      r   get_pagez"ConferenceParticipantList.get_pageY  s=     ==''..66ujI($..QQr   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of ConferenceParticipantInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ConferenceParticipantInstance
        r   N)r   r   r   request_asyncr   r   r   s      r   get_page_asyncz(ConferenceParticipantList.get_page_asynce  sJ      --44BB5*UU($..QQ Vs   4AA&Ac                 L    t        | j                  | j                  d   |      S z
        Constructs a ConferenceParticipantContext

        :param participant_sid: The unique SID identifier of the Participant.
        rf   r   r   r   r   r   rg   s     r   r   zConferenceParticipantList.getq  (     ,MM>>*:;+
 	
r   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r   __call__z"ConferenceParticipantList.__call__}  r  r   c                      y)r   z.<Twilio.Insights.V1.ConferenceParticipantList>r   r   s    r   r   z"ConferenceParticipantList.__repr__  r   r   )r   r   r   r   r   r   r   r   r   r   r   intr	   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   s   @r   r   r   b  s   
 
 
( /5ll$*LL%+\\##'";sF{+"; S&[!"; c6k"	";
 }"; C="; 
/	0";L /5ll$*LL%+\\##'"AsF{+"A S&[!"A c6k"	"A
 }"A C="A 
4	5"AL /5ll$*LL%+\\##'!
sF{+!
 S&[!!
 c6k"	!

 }!
 C=!
 
+	,!
J /5ll$*LL%+\\##'"
sF{+"
 S&[!"
 c6k"	"

 }"
 C="
 
+	,"
L /5ll$*LL%+\\)/*0,,(.(RsF{+(R S&[!(R c6k"	(R
 #v+&(R 3;'(R f%(R 
#(RX /5ll$*LL%+\\)/*0,,(.(RsF{+(R S&[!(R c6k"	(R
 #v+&(R 3;'(R f%(R 
#(RT
R3 
R+D 
R
Rs 
R7P 
R

3 

+G 



 

0L 

@# @r   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     sk     L L L + 8 : 2 ' !HW$4 HWVfV? fVR@ @*m@ m@r   