
    pi`                         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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 - Supersim
    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	serialize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 )EsimProfileInstancec                   $    e Zd ZdZdZdZdZdZdZy)EsimProfileInstance.Statusnew	reserving	available
downloaded	installedfailedN)	__name__
__module____qualname__NEW	RESERVING	AVAILABLE
DOWNLOADED	INSTALLEDFAILED     f/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/supersim/v1/esim_profile.pyStatusr      s     		!
	r'   r)   versionpayload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            | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )Nr,   account_sidiccidsim_sidstatuseidsmdp_plus_addressmatching_idactivation_code
error_codeerror_messagedate_createddate_updatedurl)super__init__getr,   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r   iso8601_datetimer8   r9   r:   	_solution_context)selfr*   r+   r,   	__class__s       r(   r<   zEsimProfileInstance.__init__4   s<    	!")++e"4*1++m*D$+KK$8
&-kk)&<>Ekk(>S")++e"407<O0P*1++m*D.5kk:K.L)0\)B,3KK,H0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 3?$((
 7;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: EsimProfileContext for this EsimProfileInstance
        r,   r,   )r@   EsimProfileContext_versionr?   rA   s    r(   _proxyzEsimProfileInstance._proxyQ   s9     == .NN5)DM }}r'   c                 6    | j                   j                         S )c
        Fetch the EsimProfileInstance


        :returns: The fetched EsimProfileInstance
        )rI   fetchrH   s    r(   rL   zEsimProfileInstance.fetch`   s     {{  ""r'   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the EsimProfileInstance


        :returns: The fetched EsimProfileInstance
        N)rI   fetch_asyncrH   s    r(   rO   zEsimProfileInstance.fetch_asynci   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/EsimProfileInstance.__repr__.<locals>.<genexpr>x        SDAq7>>!Q/S   !z+<Twilio.Supersim.V1.EsimProfileInstance {}>joinr?   itemsrV   rA   contexts     r(   __repr__zEsimProfileInstance.__repr__r   s6     ((SDNN<P<P<RSS<CCGLLr'   )N)rC   rF   )rC   r   )r   r   r   objectr)   r   r   strr   r   r<   propertyrI   rL   rO   rc   __classcell__rB   s   @r(   r   r      sp     $ OS;;)-c3h;>Fsm;:  #/M# M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 )rF   r*   r,   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the EsimProfileContext

        :param version: Version that contains the resource
        :param sid: The SID of the eSIM Profile resource to fetch.
        r,   z/ESimProfiles/{sid}Nr&   )r;   r<   r?   rV   _uri)rA   r*   r,   rB   s      r(   r<   zEsimProfileContext.__init__~   s@     	! 3
 1)00B4>>B	r'   rC   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )rK   application/jsonAcceptGETmethoduriheadersr,   rE   )r   ofrG   rL   rk   r   r?   rA   rs   r+   s      r(   rL   zEsimProfileContext.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)rN   rm   rn   ro   rp   Nr,   rE   )r   rt   rG   rO   rk   r   r?   ru   s      r(   rO   zEsimProfileContext.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 )rQ   rR   c              3   F   K   | ]  \  }}d j                  ||        ywrT   rU   rW   s      r(   r[   z.EsimProfileContext.__repr__.<locals>.<genexpr>   r\   r]   z*<Twilio.Supersim.V1.EsimProfileContext {}>r^   ra   s     r(   rc   zEsimProfileContext.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr'   )r   r   r   r   re   r<   r   rL   rO   rc   rg   rh   s   @r(   rF   rF   |   sA    C Cc C
* 
(
#6 
,L# Lr'   rF   c                   2    e Zd Zdeeef   defdZdefdZy)EsimProfilePager+   rC   c                 .    t        | j                  |      S )zq
        Build an instance of EsimProfileInstance

        :param payload: Payload response from the API
        )r   rG   )rA   r+   s     r(   get_instancezEsimProfilePage.get_instance   s     #4=='::r'   c                      y)rQ   z$<Twilio.Supersim.V1.EsimProfilePage>r&   rH   s    r(   rc   zEsimProfilePage.__repr__        6r'   N)	r   r   r   r   re   r   r   r|   rc   r&   r'   r(   rz   rz      s*    ;DcN ;7J ;6# 6r'   rz   c                       e Zd Zdef fdZ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f
dZ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f
d	Zej                  ej                  ej                  d
d
fdeee	f   deee	f   ded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d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d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d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d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d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 )EsimProfileListr*   c                 2    t         |   |       d| _        y)zm
        Initialize the EsimProfileList

        :param version: Version that contains the resource

        z/ESimProfilesN)r;   r<   rk   )rA   r*   rB   s     r(   r<   zEsimProfileList.__init__   s     	!#	r'   callback_urlcallback_methodgenerate_matching_idr2   rC   c                    t        j                  ||t        j                  |      |d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Create the EsimProfileInstance

        :param callback_url: The URL we should call using the `callback_method` when the status of the eSIM Profile changes. At this stage of the eSIM Profile pilot, the a request to the URL will only be called when the ESimProfile resource changes from `reserving` to `available`.
        :param callback_method: The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST.
        :param generate_matching_id: When set to `true`, a value for `Eid` does not need to be provided. Instead, when the eSIM profile is reserved, a matching ID will be generated and returned via the `matching_id` property. This identifies the specific eSIM profile that can be used by any capable device to claim and download the profile.
        :param eid: Identifier of the eUICC that will claim the eSIM Profile.

        :returns: The created EsimProfileInstance
        CallbackUrlCallbackMethodGenerateMatchingIdEidContent-Type!application/x-www-form-urlencodedrm   rn   POSTrq   rr   datars   )r   rt   r   boolean_to_stringrG   createrk   r   rA   r   r   r   r2   r   rs   r+   s           r(   r   zEsimProfileList.create   s    $ yy+"1&/&A&ABV&W	
 ))^-PQR"E.--&&tyytW ' 
 #4=='::r'   c                 8  K   t        j                  ||t        j                  |      |d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously create the EsimProfileInstance

        :param callback_url: The URL we should call using the `callback_method` when the status of the eSIM Profile changes. At this stage of the eSIM Profile pilot, the a request to the URL will only be called when the ESimProfile resource changes from `reserving` to `available`.
        :param callback_method: The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST.
        :param generate_matching_id: When set to `true`, a value for `Eid` does not need to be provided. Instead, when the eSIM profile is reserved, a matching ID will be generated and returned via the `matching_id` property. This identifies the specific eSIM profile that can be used by any capable device to claim and download the profile.
        :param eid: Identifier of the eUICC that will claim the eSIM Profile.

        :returns: The created EsimProfileInstance
        r   r   r   rm   rn   r   r   N)r   rt   r   r   rG   create_asyncrk   r   r   s           r(   r   zEsimProfileList.create_async  s     $ yy+"1&/&A&ABV&W	
 ))^-PQR"E.22tyytW 3 
 
 #4=='::	
s   A;B=B>BNr0   r1   r   limit	page_sizec                     | j                   j                  ||      }| j                  ||||d         }| j                   j                  ||d         S )a  
        Streams EsimProfileInstance 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 eid: List the eSIM Profiles that have been associated with an EId.
        :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records.
        :param &quot;EsimProfileInstance.Status&quot; status: List the eSIM Profiles that are in a given status.
        :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   r2   r0   r1   r   r   )rG   read_limitspagestreamrA   r2   r0   r1   r   r   limitsr   s           r(   r   zEsimProfileList.stream-  sX    4 **5)<yyWVvk?R  
 }}##D&/::r'   c                    K   | j                   j                  ||      }| j                  ||||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams EsimProfileInstance 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 eid: List the eSIM Profiles that have been associated with an EId.
        :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records.
        :param &quot;EsimProfileInstance.Status&quot; status: List the eSIM Profiles that are in a given status.
        :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   )rG   r   
page_asyncstream_asyncr   s           r(   r   zEsimProfileList.stream_asyncN  sf     4 **5)<__WVvk?R % 
 
 }}))$w@@	
s   8A A$A c           	      @    t        | j                  |||||            S )a  
        Lists EsimProfileInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str eid: List the eSIM Profiles that have been associated with an EId.
        :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records.
        :param &quot;EsimProfileInstance.Status&quot; status: List the eSIM Profiles that are in a given status.
        :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
        r2   r0   r1   r   r   )listr   )rA   r2   r0   r1   r   r   s         r(   r   zEsimProfileList.listo  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 EsimProfileInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str eid: List the eSIM Profiles that have been associated with an EId.
        :param str sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records.
        :param &quot;EsimProfileInstance.Status&quot; status: List the eSIM Profiles that are in a given status.
        :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   )rA   r2   r0   r1   r   r   records          r(   
list_asynczEsimProfileList.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                  |	      S )a  
        Retrieve a single page of EsimProfileInstance records from the API.
        Request is executed immediately

        :param eid: List the eSIM Profiles that have been associated with an EId.
        :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records.
        :param status: List the eSIM Profiles that are in a given status.
        :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 EsimProfileInstance
        r   SimSidr)   	PageTokenr   PageSizer   r   rm   rn   ro   rq   rr   paramsrs   )r   rt   rG   r   rk   rz   
rA   r2   r0   r1   r   r   r   r   rs   responses
             r(   r   zEsimProfileList.page  s    , yy! '#%	
 ))^-PQR.==%%diig & 
 t}}h77r'   c           	        K   t        j                  ||||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }	t        | j                  |	      S 7 w)	a  
        Asynchronously retrieve a single page of EsimProfileInstance records from the API.
        Request is executed immediately

        :param eid: List the eSIM Profiles that have been associated with an EId.
        :param sim_sid: Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/iot/supersim/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records.
        :param status: List the eSIM Profiles that are in a given status.
        :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 EsimProfileInstance
        r   r   r   rm   rn   ro   r   N)r   rt   rG   r   rk   rz   r   s
             r(   r   zEsimProfileList.page_async  s     , yy! '#%	
 ))^-PQR.11diig 2 
 
 t}}h77
s   A%B'B(B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of EsimProfileInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EsimProfileInstance
        ro   )rG   domaintwiliorequestrz   rA   r   r   s      r(   get_pagezEsimProfileList.get_page
  s7     ==''..66ujIt}}h77r'   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a
  
        Asynchronously retrieve a specific page of EsimProfileInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EsimProfileInstance
        ro   N)rG   r   r   request_asyncrz   r   s      r(   get_page_asynczEsimProfileList.get_page_async  sD      --44BB5*UUt}}h77 Vs   4AAAr,   c                 0    t        | j                  |      S zu
        Constructs a EsimProfileContext

        :param sid: The SID of the eSIM Profile resource to fetch.
        rE   rF   rG   rA   r,   s     r(   r=   zEsimProfileList.get"       "$--S99r'   c                 0    t        | j                  |      S r   r   r   s     r(   __call__zEsimProfileList.__call__*  r   r'   c                      y)rQ   z$<Twilio.Supersim.V1.EsimProfileList>r&   rH   s    r(   rc   zEsimProfileList.__repr__2  r~   r'   )!r   r   r   r   r<   r   unsetr   re   rd   boolr   r   r   r   intr	   r   r
   r   r   r   r   rz   r   r   r   r   rF   r=   r   rc   rg   rh   s   @r(   r   r      s   	$ 	$ ,2<<.4ll4:LL"(,,$;CK($; sF{+$; $D&L1	$;
 3;$; 
$;P ,2<<.4ll4:LL"(,,$;CK($; sF{+$; $D&L1	$;
 3;$; 
$;P #),,&,ll>Dll##';3;; sF{#; 2F:;	;
 }; C=; 
%	&;F #),,&,ll>Dll##'A3;A sF{#A 2F:;	A
 }A C=A 
*	+AF #),,&,ll>Dll##'!
3;!
 sF{#!
 2F:;	!

 }!
 C=!
 
!	"!
J #),,&,ll>Dll##'"
3;"
 sF{#"
 2F:;	"

 }"
 C="
 
!	""
L #),,&,ll>Dll)/*0,,(.(83;(8 sF{#(8 2F:;	(8
 #v+&(8 3;'(8 f%(8 
(8X #),,&,ll>Dll)/*0,,(.(83;(8 sF{#(8 2F:;	(8
 #v+&(8 3;'(8 f%(8 
(8T
83 
8? 
8
8s 
8 
8:s :1 ::C :$6 :6# 6r'   r   N)__doc__r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rF   rz   r   r&   r'   r(   <module>r      sj     L L L 6 6 8 : 2 ' !`M* `MFBL BLJ6d 6&d6l d6r'   