
    piM                         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 - Api
    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dZ	 ddedeeef   dededee   f
 fdZ	e
dd	       Zdd
ZddZej                  fdedeeef   dd fdZej                  fdedeeef   dd fdZdefdZ xZS )MemberInstancea  
    :ivar call_sid: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Member resource is associated with.
    :ivar date_enqueued: The date that the member was enqueued, given in RFC 2822 format.
    :ivar position: This member's current position in the queue.
    :ivar uri: The URI of the resource, relative to `https://api.twilio.com`.
    :ivar wait_time: The number of seconds the member has been in the queue.
    :ivar queue_sid: The SID of the Queue the member is in.
    versionpayloadaccount_sid	queue_sidcall_sidc                    t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j                  |j                  d            | _        |j                  d      | _	        t	        j                  |j                  d            | _
        |j                  d      | _        |||xs | j                  d| _        d | _        y )Nr   date_enqueuedpositionuri	wait_timer   r   r   r   )super__init__getr   r   rfc2822_datetimer   integerr   r   r   r   	_solution_context)selfr   r   r   r   r   	__class__s         l/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/queue/member.pyr    zMemberInstance.__init__#   s     	!'.{{:'>1<1M1MKK(2
 (3':':7;;z;R'S")++e"4(3(;(;GKK<T(U(/K(@ '" 1DMM

 26    returnc                     | j                   Et        | j                  | j                  d   | 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: MemberContext for this MemberInstance
        r   r   r   r   )r%   MemberContext_versionr$   r&   s    r(   _proxyzMemberInstance._proxy=   sQ     == ) NN=9..5
3	DM }}r)   c                 6    | j                   j                         S )Y
        Fetch the MemberInstance


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


        :returns: The fetched MemberInstance
        N)r/   fetch_asyncr.   s    r(   r5   zMemberInstance.fetch_asyncW   s!      [[,,....s   '%'urlmethodc                 <    | j                   j                  ||      S )]  
        Update the MemberInstance

        :param url: The absolute URL of the Queue resource.
        :param method: How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters.

        :returns: The updated MemberInstance
        r6   r7   )r/   updater&   r6   r7   s      r(   r;   zMemberInstance.update`   s&     {{!! " 
 	
r)   c                 X   K   | j                   j                  ||       d{   S 7 w)w  
        Asynchronous coroutine to update the MemberInstance

        :param url: The absolute URL of the Queue resource.
        :param method: How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters.

        :returns: The updated MemberInstance
        r:   N)r/   update_asyncr<   s      r(   r?   zMemberInstance.update_asyncp   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>z*MemberInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z$<Twilio.Api.V2010.MemberInstance {}>joinr$   itemsrF   r&   contexts     r(   __repr__zMemberInstance.__repr__   s6     ((SDNN<P<P<RSS5<<WEEr)   )N)r*   r,   )r*   r   )__name__
__module____qualname____doc__r   r   strr   r   r    propertyr/   r2   r5   r   unsetr   objectr;   r?   rS   __classcell__r'   s   @r(   r   r      s     #'66 c3h6 	6
 6 3-64   #/ 6<\\

 %c6k 2
	
" 6<\\

 %c6k 2
	
 F# Fr)   r   c                        e Zd Zdedededef fdZdefdZdefdZe	j                  fd	ed
eeef   defdZe	j                  fd	ed
eeef   defdZdefdZ xZS )r,   r   r   r   r   c                 |    t         |   |       |||d| _         dj                  di | j                  | _        y)a  
        Initialize the MemberContext

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to update.
        :param queue_sid: The SID of the Queue in which to find the members to update.
        :param call_sid: The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to update.
        r   zB/Accounts/{account_sid}/Queues/{queue_sid}/Members/{call_sid}.jsonN r   r    r$   rF   _uri)r&   r   r   r   r   r'   s        r(   r    zMemberContext.__init__   sM     	! '" 
 XPWW .. 		r)   r*   c                    t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d   | j                  d         S )	r1   application/jsonAcceptGETr7   r   headersr   r   r   r   )r   ofr-   r2   rb   r   r$   r&   rh   r   s      r(   r2   zMemberContext.fetch   su     ))B-.--%%U		7%SMM}5nn[1^^J/
 	
r)   c                 $  K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d   | j                  d   	      S 7 Ew)
r4   rd   re   rf   rg   Nr   r   r   r   )r   ri   r-   r5   rb   r   r$   rj   s      r(   r5   zMemberContext.fetch_async   s      ))B-.11dii 2 
 
 MM}5nn[1^^J/
 	
	
s   ABB	ABr6   r7   c                 D   t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   | j                  d
         S )r9   UrlMethod!application/x-www-form-urlencodedContent-Typerd   re   POSTr7   r   datarh   r   r   r   r   )r   ri   r-   r;   rb   r   r$   r&   r6   r7   rt   rh   r   s         r(   r;   zMemberContext.update   s     yy 
 ))B-"E.--&&tyytW ' 
 MM}5nn[1^^J/
 	
r)   c                 `  K   t        j                  ||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
   | j                  d         S 7 Ew)r>   rm   rp   rq   rd   re   rr   rs   Nr   r   r   r   )r   ri   r-   r?   rb   r   r$   ru   s         r(   r?   zMemberContext.update_async   s      yy 
 ))B-"E.22tyytW 3 
 
 MM}5nn[1^^J/
 	
	
s   A$B.&B,'AB.c                     dj                  d | j                  j                         D              }dj                  |      S )rA   rB   c              3   F   K   | ]  \  }}d j                  ||        ywrD   rE   rG   s      r(   rK   z)MemberContext.__repr__.<locals>.<genexpr>!  rL   rM   z#<Twilio.Api.V2010.MemberContext {}>rN   rQ   s     r(   rS   zMemberContext.__repr__  s6     ((SDNN<P<P<RSS4;;GDDr)   )rT   rU   rV   r   rX   r    r   r2   r5   r   rZ   r   r[   r;   r?   rS   r\   r]   s   @r(   r,   r,      s    

-0
=@
LO
2
~ 
,
> 
2 6<\\"
"
 %c6k 2"
	"
J 6<\\"
"
 %c6k 2"
	"
HE# Er)   r,   c                   2    e Zd Zdeeef   defdZdefdZy)
MemberPager   r*   c                 h    t        | j                  || j                  d   | j                  d         S )zl
        Build an instance of MemberInstance

        :param payload: Payload response from the API
        r   r   r   r   )r   r-   r$   )r&   r   s     r(   get_instancezMemberPage.get_instance'  s3     MM}5nn[1	
 	
r)   c                      y)rA   z<Twilio.Api.V2010.MemberPage>r`   r.   s    r(   rS   zMemberPage.__repr__4       /r)   N)	rT   rU   rV   r   rX   r   r   r}   rS   r`   r)   r(   rz   rz   %  s)    
DcN 
~ 
/# /r)   rz   c            	           e Zd Zde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 )
MemberListr   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)aC  
        Initialize the MemberList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to read.
        :param queue_sid: The SID of the Queue in which to find the members

        r|   z7/Accounts/{account_sid}/Queues/{queue_sid}/Members.jsonNr`   ra   )r&   r   r   r   r'   s       r(   r    zMemberList.__init__?  sG     	! '"
 UMTT 
nn
	r)   limit	page_sizer*   c                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a\  
        Streams MemberInstance 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MemberList.streamS  sJ    ( **5)<yy6+#6y7}}##D&/::r)   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ak  
        Asynchronously streams MemberInstance 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MemberList.stream_asyncl  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists MemberInstance 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MemberList.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 MemberInstance 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MemberList.list_async  sT     * '+&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 )aq  
        Retrieve a single page of MemberInstance 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 MemberInstance
        	PageTokenr   PageSizerq   rp   rd   re   rf   r7   r   paramsrh   )r   ri   r-   r   rb   rz   r$   r&   r   r   r   rt   rh   responses          r(   r   zMemberList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 $--4>>BBr)   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 MemberInstance 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 MemberInstance
        r   rq   rp   rd   re   rf   r   N)r   ri   r-   r   rb   rz   r$   r   s          r(   r   zMemberList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 $--4>>BB
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of MemberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MemberInstance
        rf   )r-   domaintwiliorequestrz   r$   r&   r   r   s      r(   get_pagezMemberList.get_page  s=     ==''..66ujI$--4>>BBr)   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a   
        Asynchronously retrieve a specific page of MemberInstance records from the API.
        Request is executed immediately

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

        :returns: Page of MemberInstance
        rf   N)r-   r   r   request_asyncrz   r$   r   s      r(   get_page_asynczMemberList.get_page_async  sJ      --44BB5*UU$--4>>BB Vs   4AA&Ar   c                 h    t        | j                  | j                  d   | j                  d   |      S z
        Constructs a MemberContext

        :param call_sid: The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to update.
        r   r   r   r,   r-   r$   r&   r   s     r(   r!   zMemberList.get  3     MM}5nn[1	
 	
r)   c                 h    t        | j                  | j                  d   | j                  d   |      S r   r   r   s     r(   __call__zMemberList.__call__!  r   r)   c                      y)rA   z<Twilio.Api.V2010.MemberList>r`   r.   s    r(   rS   zMemberList.__repr__.  r   r)   )NN)rT   rU   rV   r   rX   r    r   intr	   r   r   r
   r   r   r   r   r   rZ   r   r[   rz   r   r   r   r   r,   r!   r   rS   r\   r]   s   @r(   r   r   =  s   
 
c 
c 
,  $#';}; C=; 
.	!	;6  $#'A}A C=A 
~	&	A6  $#'
}
 C=
 
n		
8  $#'
}
 C=
 
n		
: *0*0,,(.	C#v+&C 3;'C f%	C
 
CF *0*0,,(.	C#v+&C 3;'C f%	C
 
CB
C3 
C: 
C
Cs 
Cz 
C
C 
M 

 
 
/# /r)   r   N)rW   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,   rz   r   r`   r)   r(   <module>r      sg     L L L + 8 : 2 ' !nF% nFbXEO XEv/ /0w/ w/r)   