o
    /ic\                     @   s   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 deZG dd deZG dd deZG dd deZdS )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values)InstanceContext)InstanceResource)ListResource)Version)Pagec                       s|   e Zd ZG dd deZ	 	ddedeeef de	e f fddZ
edddZdddZdddZd	efddZ  ZS )EsimProfileInstancec                   @   s$   e Zd ZdZdZdZdZdZdZdS )EsimProfileInstance.Statusnew	reserving	available
downloaded	installedfailedN)	__name__
__module____qualname__NEW	RESERVING	AVAILABLE
DOWNLOADED	INSTALLEDFAILED r"   r"   _/var/www/html/philips/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/esim_profile.pyStatus   s    r$   Nversionpayloadsidc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
|d	| _|d
| _|d| _t|d| _t|d| _|d| _d|pe| ji| _d | _d S )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)   r*   r+   r,   r-   r.   r/   r0   r1   r
   iso8601_datetimer2   r3   r4   	_solution_context)selfr%   r&   r'   	__class__r"   r#   r6   4   s,   

zEsimProfileInstance.__init__returnEsimProfileContextc                 C   s&   | j du rt| j| jd 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
        Nr'   r'   )r:   r?   _versionr9   r;   r"   r"   r#   _proxyQ   s   
zEsimProfileInstance._proxyc                 C   s
   | j  S )c
        Fetch the EsimProfileInstance


        :returns: The fetched EsimProfileInstance
        )rC   fetchrB   r"   r"   r#   rE   `   s   
zEsimProfileInstance.fetchc                    s   | j  I dH S )}
        Asynchronous coroutine to fetch the EsimProfileInstance


        :returns: The fetched EsimProfileInstance
        N)rC   fetch_asyncrB   r"   r"   r#   rG   i   s   zEsimProfileInstance.fetch_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr"   r"   r#   	<genexpr>x       z/EsimProfileInstance.__repr__.<locals>.<genexpr>z+<Twilio.Supersim.V1.EsimProfileInstance {}>joinr9   itemsrN   r;   contextr"   r"   r#   __repr__r      
zEsimProfileInstance.__repr__N)r>   r?   )r>   r   )r   r   r   objectr$   r   r   strr   r   r6   propertyrC   rE   rG   rZ   __classcell__r"   r"   r<   r#   r      s     


		r   c                       sP   e Zd Zdedef fddZdefddZdefdd	Zdefd
dZ	  Z
S )r?   r%   r'   c                    s.   t  | d|i| _djdi | j| _dS )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"   )r5   r6   r9   rN   _uri)r;   r%   r'   r<   r"   r#   r6   }   s   zEsimProfileContext.__init__r>   c                 C   s(   | j jd| jd}t| j || jd dS )rD   GETmethodurir'   r@   )rA   rE   ra   r   r9   r;   r&   r"   r"   r#   rE      s   zEsimProfileContext.fetchc                    s0   | j jd| jdI dH }t| j || jd dS )rF   rb   rc   Nr'   r@   )rA   rG   ra   r   r9   rf   r"   r"   r#   rG      s   zEsimProfileContext.fetch_asyncc                 C   rH   )rI   rJ   c                 s   rK   rL   rM   rO   r"   r"   r#   rS      rT   z.EsimProfileContext.__repr__.<locals>.<genexpr>z*<Twilio.Supersim.V1.EsimProfileContext {}>rU   rX   r"   r"   r#   rZ      r[   zEsimProfileContext.__repr__)r   r   r   r   r^   r6   r   rE   rG   rZ   r`   r"   r"   r<   r#   r?   |   s
    r?   c                   @   s4   e Zd Zdeeef defddZdefddZdS )EsimProfilePager&   r>   c                 C   s   t | j|S )zq
        Build an instance of EsimProfileInstance

        :param payload: Payload response from the API
        )r   rA   rf   r"   r"   r#   get_instance   s   zEsimProfilePage.get_instancec                 C      dS )rI   z$<Twilio.Supersim.V1.EsimProfilePage>r"   rB   r"   r"   r#   rZ         zEsimProfilePage.__repr__N)	r   r   r   r   r^   r   r   rh   rZ   r"   r"   r"   r#   rg      s    rg   c                       sX  e Zd Zdef fd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	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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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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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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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d Zd!edefd"d#Zd!edefd$d%Zd&edefd'd(Zd&edefd)d*Zdefd+d,Z  Z S )-EsimProfileListr%   c                    s   t  | d| _dS )zm
        Initialize the EsimProfileList

        :param version: Version that contains the resource

        z/ESimProfilesN)r5   r6   ra   )r;   r%   r<   r"   r#   r6      s   
zEsimProfileList.__init__callback_urlcallback_methodgenerate_matching_idr,   r>   c                 C   s4   t ||||d}| jjd| j|d}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POSTrd   re   data)r   ofrA   createra   r   r;   rl   rm   rn   r,   rv   r&   r"   r"   r#   rx      s   	zEsimProfileList.createc                    s<   t ||||d}| jjd| j|dI dH }t| j|S )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
        ro   rt   ru   N)r   rw   rA   create_asyncra   r   ry   r"   r"   r#   rz      s   	zEsimProfileList.create_asyncNr*   r+   r   limit	page_sizec                 C   s6   | j ||}| j||||d d}| 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/wireless/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,   r*   r+   r|   r{   )rA   read_limitspagestreamr;   r,   r*   r+   r{   r|   limitsr   r"   r"   r#   r     s
   zEsimProfileList.streamc                    s>   | j ||}| j||||d dI dH }| j ||d S )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/wireless/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{   )rA   r~   
page_asyncstream_asyncr   r"   r"   r#   r   ?  s   zEsimProfileList.stream_asyncc                 C   s   t | j|||||d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/wireless/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,   r*   r+   r{   r|   )listr   r;   r,   r*   r+   r{   r|   r"   r"   r#   r   `  s   zEsimProfileList.listc                    s,   dd | j |||||dI dH 2 I dH S )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/wireless/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
        c                    s   g | z3 d H W }|q6 S r\   r"   )rP   recordr"   r"   r#   
<listcomp>  s
    z.EsimProfileList.list_async.<locals>.<listcomp>r   N)r   r   r"   r"   r#   
list_async  s   
zEsimProfileList.list_async
page_tokenpage_numberc           	   	   C   s8   t ||||||d}| jjd| j|d}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/wireless/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
        rs   SimSidr$   	PageTokenr   PageSizerb   rd   re   params)r   rw   rA   r   ra   rg   	r;   r,   r*   r+   r   r   r|   rv   responser"   r"   r#   r     s   zEsimProfileList.pagec           	   	      s@   t ||||||d}| jjd| j|dI dH }t| j|S )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/wireless/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   rb   r   N)r   rw   rA   r   ra   rg   r   r"   r"   r#   r     s   zEsimProfileList.page_async
target_urlc                 C   s   | 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
        rb   )rA   domaintwiliorequestrg   r;   r   r   r"   r"   r#   get_page  s   	zEsimProfileList.get_pagec                    s&   | j jjd|I dH }t| j |S )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
        rb   N)rA   r   r   request_asyncrg   r   r"   r"   r#   get_page_async  s   	zEsimProfileList.get_page_asyncr'   c                 C      t | j|dS zu
        Constructs a EsimProfileContext

        :param sid: The SID of the eSIM Profile resource to fetch.
        r@   r?   rA   r;   r'   r"   r"   r#   r7   	     zEsimProfileList.getc                 C   r   r   r   r   r"   r"   r#   __call__  r   zEsimProfileList.__call__c                 C   ri   )rI   z$<Twilio.Supersim.V1.EsimProfileList>r"   rB   r"   r"   r#   rZ     rj   zEsimProfileList.__repr__)!r   r   r   r   r6   r   unsetr   r^   r]   boolr   rx   rz   r   intr   r   r	   r   r   r   r   rg   r   r   r   r   r?   r7   r   rZ   r`   r"   r"   r<   r#   rk      s.   




$




$



#



#



%



&






&






&rk   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?   rg   rk   r"   r"   r"   r#   <module>   s    $b@