
    piI                         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 - Intelligence
    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	 	 ddedeeef   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 )OperatorInstancec                   $    e Zd ZdZdZdZdZdZdZy)OperatorInstance.Availabilityinternalbetapublic
deprecatedzgeneral-availabilityretiredN)	__name__
__module____qualname__INTERNALBETAPUBLIC
DEPRECATEDGENERAL_AVAILABILITYRETIRED     f/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/intelligence/v2/operator.pyAvailabilityr      s!    !
5r%   r'   versionpayloadsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d	      | _        t        j                  |j                  d
            | _        t        j                  |j                  d            | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )Naccount_sidr*   friendly_namedescriptionauthoroperator_typer(   availabilityconfigdate_createddate_updatedurl)super__init__getr,   r*   r-   r.   r/   r0   r   integerr(   r1   r2   iso8601_datetimer3   r4   r5   	_solution_context)selfr(   r)   r*   	__class__s       r&   r7   zOperatorInstance.__init__2   s+    	!*1++m*D")++e"4,3KK,H*1++m*D%,[[%:,3KK,H&1&9&9'++i:P&QGN{{H
 4;;;x3H0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 3?$((
 48r%   returnc                     | j                   )t        | j                  | 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: OperatorContext for this OperatorInstance
        r*   r*   )r<   OperatorContext_versionr;   r=   s    r&   _proxyzOperatorInstance._proxyO   s9     == +NN5)DM }}r%   c                 6    | j                   j                         S )]
        Fetch the OperatorInstance


        :returns: The fetched OperatorInstance
        )rE   fetchrD   s    r&   rH   zOperatorInstance.fetch^   s     {{  ""r%   c                 R   K   | j                   j                          d{   S 7 w)w
        Asynchronous coroutine to fetch the OperatorInstance


        :returns: The fetched OperatorInstance
        N)rE   fetch_asyncrD   s    r&   rK   zOperatorInstance.fetch_asyncg   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,OperatorInstance.__repr__.<locals>.<genexpr>v        SDAq7>>!Q/S   !z,<Twilio.Intelligence.V2.OperatorInstance {}>joinr;   itemsrR   r=   contexts     r&   __repr__zOperatorInstance.__repr__p   s6     ((SDNN<P<P<RSS=DDWMMr%   )N)r?   rB   )r?   r   )r   r   r   objectr'   r   r   strr   r   r7   propertyrE   rH   rK   r_   __classcell__r>   s   @r&   r   r      sp    v   OS88)-c3h8>Fsm8:  #/N# Nr%   r   c                   L     e Zd Z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 )rB   r(   r*   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the OperatorContext

        :param version: Version that contains the resource
        :param sid: A 34 character string that uniquely identifies this Operator.
        r*   z/Operators/{sid}Nr$   )r6   r7   r;   rR   _uri)r=   r(   r*   r>   s      r&   r7   zOperatorContext.__init__|   s@     	! 3
 .&--??	r%   r?   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )rG   application/jsonAcceptGETmethoduriheadersr*   rA   )r   ofrC   rH   rg   r   r;   r=   ro   r)   s      r&   rH   zOperatorContext.fetch   s]     ))B-.--%%U		7%SMMu%
 	
r%   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)rJ   ri   rj   rk   rl   Nr*   rA   )r   rp   rC   rK   rg   r   r;   rq   s      r&   rK   zOperatorContext.fetch_async   sr      ))B-.11dii 2 
 
  MMu%
 	
	
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )rM   rN   c              3   F   K   | ]  \  }}d j                  ||        ywrP   rQ   rS   s      r&   rW   z+OperatorContext.__repr__.<locals>.<genexpr>   rX   rY   z+<Twilio.Intelligence.V2.OperatorContext {}>rZ   r]   s     r&   r_   zOperatorContext.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr%   )r   r   r   r   ra   r7   r   rH   rK   r_   rc   rd   s   @r&   rB   rB   z   sA    @ @c @
' 
(
#3 
,M# Mr%   rB   c                   2    e Zd Zdeeef   defdZdefdZy)OperatorPager)   r?   c                 .    t        | j                  |      S )zn
        Build an instance of OperatorInstance

        :param payload: Payload response from the API
        )r   rC   )r=   r)   s     r&   get_instancezOperatorPage.get_instance   s      w77r%   c                      y)rM   z%<Twilio.Intelligence.V2.OperatorPage>r$   rD   s    r&   r_   zOperatorPage.__repr__        7r%   N)	r   r   r   r   ra   r   r   rx   r_   r$   r%   r&   rv   rv      s*    8DcN 87G 87# 7r%   rv   c                       e Zd Zdef fdZej                  ej                  ddfdedef   dee	ef   de
e   de
e   d	ee   f
d
Zej                  ej                  ddfdedef   dee	ef   de
e   de
e   d	ee   f
dZej                  ej                  ddfdedef   dee	ef   de
e   de
e   d	ee   f
dZej                  ej                  ddfded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                  fdedef   dee	ef   dee	ef   deeef   deeef   d	efdZej                  ej                  ej                  ej                  ej                  fded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 )OperatorListr(   c                 2    t         |   |       d| _        y)zj
        Initialize the OperatorList

        :param version: Version that contains the resource

        z
/OperatorsN)r6   r7   rg   )r=   r(   r>   s     r&   r7   zOperatorList.__init__   s     	! 	r%   Nr1   r   language_codelimit	page_sizer?   c                     | j                   j                  ||      }| j                  |||d         }| j                   j                  ||d         S )ak  
        Streams OperatorInstance 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 &quot;OperatorInstance.Availability&quot; availability: Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
        :param str language_code: Returns Operators that support the provided language code.
        :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   r1   r~   r   r   )rC   read_limitspagestreamr=   r1   r~   r   r   limitsr   s          r&   r   zOperatorList.stream   sX    0 **5)<yy%'[)  
 }}##D&/::r%   c                    K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  ||d         S 7 #w)az  
        Asynchronously streams OperatorInstance 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 &quot;OperatorInstance.Availability&quot; availability: Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
        :param str language_code: Returns Operators that support the provided language code.
        :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   )rC   r   
page_asyncstream_asyncr   s          r&   r   zOperatorList.stream_async   sf     0 **5)<__%'[) % 
 
 }}))$w@@
s   7AA$Ac                 >    t        | j                  ||||            S )a  
        Lists OperatorInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param &quot;OperatorInstance.Availability&quot; availability: Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
        :param str language_code: Returns Operators that support the provided language code.
        :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
        r1   r~   r   r   )listr   )r=   r1   r~   r   r   s        r&   r   zOperatorList.list!  s.    . KK)+#	  
 	
r%   c                 ~   K   | j                  ||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists OperatorInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param &quot;OperatorInstance.Availability&quot; availability: Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
        :param str language_code: Returns Operators that support the provided language code.
        :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=   r1   r~   r   r   records         r&   
list_asynczOperatorList.list_asyncA  sZ     2 '+&7&7)+#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=
page_tokenpage_numberc                     t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )aT  
        Retrieve a single page of OperatorInstance records from the API.
        Request is executed immediately

        :param availability: Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
        :param language_code: Returns Operators that support the provided language code.
        :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 OperatorInstance
        r'   LanguageCode	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedri   rj   rk   rm   rn   paramsro   )r   rp   rC   r   rg   rv   	r=   r1   r~   r   r   r   dataro   responses	            r&   r   zOperatorList.pageb  s    ( yy , -'#%
 ))^-PQR.==%%diig & 
 DMM844r%   c                 
  K   t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	ac  
        Asynchronously retrieve a single page of OperatorInstance records from the API.
        Request is executed immediately

        :param availability: Returns Operators with the provided availability type. Possible values: internal, beta, public, retired.
        :param language_code: Returns Operators that support the provided language code.
        :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 OperatorInstance
        r   r   r   ri   rj   rk   r   N)r   rp   rC   r   rg   rv   r   s	            r&   r   zOperatorList.page_async  s     ( yy , -'#%
 ))^-PQR.11diig 2 
 
 DMM844
s   A$B&B'B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of OperatorInstance records from the API.
        Request is executed immediately

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

        :returns: Page of OperatorInstance
        rk   )rC   domaintwiliorequestrv   r=   r   r   s      r&   get_pagezOperatorList.get_page  s7     ==''..66ujIDMM844r%   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of OperatorInstance records from the API.
        Request is executed immediately

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

        :returns: Page of OperatorInstance
        rk   N)rC   r   r   request_asyncrv   r   s      r&   get_page_asynczOperatorList.get_page_async  sD      --44BB5*UUDMM844 Vs   4AAAr*   c                 0    t        | j                  |      S z
        Constructs a OperatorContext

        :param sid: A 34 character string that uniquely identifies this Operator.
        rA   rB   rC   r=   r*   s     r&   r8   zOperatorList.get       t}}#66r%   c                 0    t        | j                  |      S r   r   r   s     r&   __call__zOperatorList.__call__  r   r%   c                      y)rM   z%<Twilio.Intelligence.V2.OperatorList>r$   rD   s    r&   r_   zOperatorList.__repr__  rz   r%   )r   r   r   r   r7   r   unsetr   r`   ra   r   intr	   r   r   r
   r   r   r   r   rv   r   r   r   r   rB   r8   r   r_   rc   rd   s   @r&   r|   r|      sY   	! 	! HN||,2LL##';;VCD; S&[); }	;
 C=; 
"	#;F HN||,2LL##'A;VCDA S&[)A }	A
 C=A 
'	(AF HN||,2LL##'
;VCD
 S&[)
 }	

 C=
 
	
D HN||,2LL##'
;VCD
 S&[)
 }	

 C=
 
	
F HN||,2LL)/*0,,(.%5;VCD%5 S&[)%5 #v+&	%5
 3;'%5 f%%5 
%5R HN||,2LL)/*0,,(.%5;VCD%5 S&[)%5 #v+&	%5
 3;'%5 f%%5 
%5N
53 
5< 
5
5s 
5| 
57s 7 77C 7O 77# 7r%   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   rB   rv   r|   r$   r%   r&   <module>r      sg     L L L + 8 : 2 ' !^N' ^NBBMo BMJ74 7&L7< L7r%   