
    gH                         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y)OperatorInstance.AvailabilityinternalbetapublicretiredN)__name__
__module____qualname__INTERNALBETAPUBLICRETIRED     a/var/www/html/Manimaran/venv/lib/python3.12/site-packages/twilio/rest/intelligence/v2/operator.pyAvailabilityr      s    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,   r-   r   integerr%   r.   r/   iso8601_datetimer0   r1   r2   	_solution_context)selfr%   r&   r'   	__class__s       r#   r4   zOperatorInstance.__init__0   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'   )r9   OperatorContext_versionr8   r:   s    r#   _proxyzOperatorInstance._proxyM   s9     == +NN5)DM }}r"   c                 6    | j                   j                         S )]
        Fetch the OperatorInstance


        :returns: The fetched OperatorInstance
        )rB   fetchrA   s    r#   rE   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)rB   fetch_asyncrA   s    r#   rH   zOperatorInstance.fetch_asynce   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>t   "     S<RDAq7>>!Q/<R   !z,<Twilio.Intelligence.V2.OperatorInstance {}>joinr8   itemsrO   r:   contexts     r#   __repr__zOperatorInstance.__repr__n   s6     ((SDNN<P<P<RSS=DDWMMr"   )N)r<   r?   )r<   r   )r   r   r   objectr$   r   r   strr   r   r4   propertyrB   rE   rH   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 )r?   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!   )r3   r4   r8   rO   _uri)r:   r%   r'   r;   s      r#   r4   zOperatorContext.__init__z   s@     	! 3
 .&--??	r"   r<   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )rD   application/jsonAcceptGETmethoduriheadersr'   r>   )r   ofr@   rE   rd   r   r8   r:   rl   r&   s      r#   rE   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)rG   rf   rg   rh   ri   Nr'   r>   )r   rm   r@   rH   rd   r   r8   rn   s      r#   rH   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 )rJ   rK   c              3   F   K   | ]  \  }}d j                  ||        ywrM   rN   rP   s      r#   rT   z+OperatorContext.__repr__.<locals>.<genexpr>   rU   rV   z+<Twilio.Intelligence.V2.OperatorContext {}>rW   rZ   s     r#   r\   zOperatorContext.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr"   )r   r   r   r   r^   r4   r   rE   rH   r\   r`   ra   s   @r#   r?   r?   x   sA    @ @c @
' 
(
#3 
,M# Mr"   r?   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   r@   )r:   r&   s     r#   get_instancezOperatorPage.get_instance   s      w77r"   c                      y)rJ   z%<Twilio.Intelligence.V2.OperatorPage>r!   rA   s    r#   r\   zOperatorPage.__repr__        7r"   N)	r   r   r   r   r^   r   r   ru   r\   r!   r"   r#   rs   rs      s*    8DcN 87G 87# 7r"   rs   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)r3   r4   rd   )r:   r%   r;   s     r#   r4   zOperatorList.__init__   s     	! 	r"   Nr.   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}   r.   r{   r}   r|   )r@   read_limitspagestreamr:   r.   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|   )r@   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
        r.   r{   r|   r}   )listr   )r:   r.   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:   r.   r{   r|   r}   records         r#   
list_asynczOperatorList.list_async?  s_     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-urlencodedrf   rg   rh   rj   rk   paramsrl   )r   rm   r@   r   rd   rs   	r:   r.   r{   r   r   r}   datarl   responses	            r#   r   zOperatorList.page`  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   rf   rg   rh   r   N)r   rm   r@   r   rd   rs   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
        rh   )r@   domaintwiliorequestrs   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
        rh   N)r@   r   r   request_asyncrs   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.
        r>   r?   r@   r:   r'   s     r#   r5   zOperatorList.get       t}}#66r"   c                 0    t        | j                  |      S r   r   r   s     r#   __call__zOperatorList.__call__  r   r"   c                      y)rJ   z%<Twilio.Intelligence.V2.OperatorList>r!   rA   s    r#   r\   zOperatorList.__repr__  rw   r"   )r   r   r   r   r4   r   unsetr   r]   r^   r   intr	   r   r   r
   r   r   r   r   rs   r   r   r   r   r?   r5   r   r\   r`   ra   s   @r#   ry   ry      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"   ry   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?   rs   ry   r!   r"   r#   <module>r      sg     L L L + 8 : 2 ' !\N' \N~BMo BMJ74 7&L7< L7r"   