o
    eL=                     @   s   d 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	 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 )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       s   e Zd ZdZ fddZejejejfddZejejejddfddZejejejddfd	d
Z	ejejejejejejfddZ
dd Zdd Zdd Zdd Z  ZS )EsimProfileListk PLEASE NOTE that this class contains beta products that are subject to
    change. Use them with caution. c                    s.   t t| | i | _djdi | j| _dS )a  
        Initialize the EsimProfileList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.supersim.v1.esim_profile.EsimProfileList
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileList
        z/ESimProfilesN )superr   __init__	_solutionformat_uri)selfversion	__class__r
   W/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/esim_profile.pyr      s   	zEsimProfileList.__init__c                 C   s2   t |||d}| jjd| j|d}t| j|S )a  
        Create the EsimProfileInstance

        :param unicode callback_url: The URL we should call after we have sent when the status of the eSIM Profile changes
        :param unicode callback_method: The HTTP method we should use to call callback_url
        :param unicode eid: Identifier of the eUICC that will claim the eSIM Profile

        :returns: The created EsimProfileInstance
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileInstance
        )CallbackUrlCallbackMethodEidPOST)methoduridata)r   of_versioncreater   EsimProfileInstance)r   callback_urlcallback_methodeidr   payloadr
   r
   r   r   $   s   zEsimProfileList.createNc                 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 unicode eid: List the eSIM Profiles that have been associated with an EId
        :param unicode sim_sid: Find the eSIM Profile resource related to a Sim resource by providing the SIM SID
        :param EsimProfileInstance.Status status: List the eSIM Profiles that are in a given status
        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.supersim.v1.esim_profile.EsimProfileInstance]
        	page_size)r"   sim_sidstatusr$   limit)r   read_limitspagestream)r   r"   r%   r&   r'   r$   limitsr)   r
   r
   r   r*   6   s   zEsimProfileList.streamc                 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 unicode eid: List the eSIM Profiles that have been associated with an EId
        :param unicode sim_sid: Find the eSIM Profile resource related to a Sim resource by providing the SIM SID
        :param EsimProfileInstance.Status status: List the eSIM Profiles that are in a given status
        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.supersim.v1.esim_profile.EsimProfileInstance]
        )r"   r%   r&   r'   r$   )listr*   )r   r"   r%   r&   r'   r$   r
   r
   r   r,   Q   s   zEsimProfileList.listc           	   	   C   s<   t ||||||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of EsimProfileInstance records from the API.
        Request is executed immediately

        :param unicode eid: List the eSIM Profiles that have been associated with an EId
        :param unicode sim_sid: Find the eSIM Profile resource related to a Sim resource by providing the SIM SID
        :param EsimProfileInstance.Status status: List the eSIM Profiles that are in a given status
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of EsimProfileInstance
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfilePage
        )r   SimSidStatus	PageTokenr   PageSizeGET)r   r   params)r   r   r   r)   r   EsimProfilePager   )	r   r"   r%   r&   
page_tokenpage_numberr$   r   responser
   r
   r   r)   g   s   	zEsimProfileList.pagec                 C   s"   | j jjd|}t| j || jS )aD  
        Retrieve a specific page of EsimProfileInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EsimProfileInstance
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfilePage
        r1   )r   domaintwiliorequestr3   r   )r   
target_urlr6   r
   r
   r   get_page   s
   

zEsimProfileList.get_pagec                 C      t | j|dS a  
        Constructs a EsimProfileContext

        :param sid: The SID of the eSIM Profile resource to fetch

        :returns: twilio.rest.supersim.v1.esim_profile.EsimProfileContext
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileContext
        sidEsimProfileContextr   r   r?   r
   r
   r   get      	zEsimProfileList.getc                 C   r<   r=   r@   rB   r
   r
   r   __call__   rD   zEsimProfileList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z$<Twilio.Supersim.V1.EsimProfileList>r
   r   r
   r
   r   __repr__      zEsimProfileList.__repr__)__name__
__module____qualname____doc__r   r   unsetr   r*   r,   r)   r;   rC   rE   rI   __classcell__r
   r
   r   r   r      s(    



r   c                       0   e Zd ZdZ fddZdd Zdd Z  ZS )r3   r	   c                    s   t t| || || _dS )a9  
        Initialize the EsimProfilePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.supersim.v1.esim_profile.EsimProfilePage
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfilePage
        N)r   r3   r   r   )r   r   r6   solutionr   r
   r   r      s   

zEsimProfilePage.__init__c                 C   s   t | j|S )a  
        Build an instance of EsimProfileInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.supersim.v1.esim_profile.EsimProfileInstance
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileInstance
        )r   r   r   r#   r
   r
   r   get_instance   s   	zEsimProfilePage.get_instancec                 C   rF   )rG   z$<Twilio.Supersim.V1.EsimProfilePage>r
   rH   r
   r
   r   rI      rJ   zEsimProfilePage.__repr__)rK   rL   rM   rN   r   rT   rI   rP   r
   r
   r   r   r3      s
    r3   c                       rQ   )rA   r	   c                    s2   t t| | d|i| _djdi | j| _dS )aL  
        Initialize the EsimProfileContext

        :param Version version: Version that contains the resource
        :param sid: The SID of the eSIM Profile resource to fetch

        :returns: twilio.rest.supersim.v1.esim_profile.EsimProfileContext
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileContext
        r?   z/ESimProfiles/{sid}Nr
   )r   rA   r   r   r   r   )r   r   r?   r   r
   r   r      s   

zEsimProfileContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the EsimProfileInstance

        :returns: The fetched EsimProfileInstance
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileInstance
        r1   )r   r   r?   r>   )r   fetchr   r   r   rS   r
   r
   r   rV      s   zEsimProfileContext.fetchc                 C   $   d dd | j D }d|S )rG    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr
   r
   r   	<genexpr>      z.EsimProfileContext.__repr__.<locals>.<genexpr>z*<Twilio.Supersim.V1.EsimProfileContext {}>joinr   itemsr   r   contextr
   r
   r   rI         
zEsimProfileContext.__repr__)rK   rL   rM   rN   r   rV   rI   rP   r
   r
   r   r   rA      s
    rA   c                       s   e Zd ZdZG dd deZd% fdd	Zedd Zed	d
 Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd  Zd!d" Zd#d$ Z  ZS )&r   r	   c                   @   s$   e Zd ZdZdZdZdZdZdZdS )zEsimProfileInstance.Statusnew	reserving	available
downloaded	installedfailedN)	rK   rL   rM   NEW	RESERVING	AVAILABLE
DOWNLOADED	INSTALLEDFAILEDr
   r
   r
   r   r.     s    r.   Nc                    s   t t| | |d|d|d|d|d|d|d|d|d	t|d
t|d|dd| _d| _d|pL| jd i| _dS )z
        Initialize the EsimProfileInstance

        :returns: twilio.rest.supersim.v1.esim_profile.EsimProfileInstance
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileInstance
        r?   account_sidiccidr%   r&   r"   smdp_plus_address
error_codeerror_messagedate_createddate_updatedurl)r?   rt   ru   r%   r&   r"   rv   rw   rx   ry   rz   r{   N)	r   r   r   rC   r   iso8601_datetime_properties_contextr   )r   r   r#   r?   r   r
   r   r     s    zEsimProfileInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )a:  
        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
        :rtype: twilio.rest.supersim.v1.esim_profile.EsimProfileContext
        Nr?   r>   )r~   rA   r   r   rH   r
   r
   r   _proxy1  s   
	zEsimProfileInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r?   r}   rH   r
   r
   r   r?   >     
zEsimProfileInstance.sidc                 C   r   )zu
        :returns: The SID of the Account to which the eSIM Profile resource belongs
        :rtype: unicode
        rt   r   rH   r
   r
   r   rt   F  r   zEsimProfileInstance.account_sidc                 C   r   )z^
        :returns: The ICCID associated with the Sim resource
        :rtype: unicode
        ru   r   rH   r
   r
   r   ru   N  r   zEsimProfileInstance.iccidc                 C   r   )zo
        :returns: The SID of the Sim resource that this eSIM Profile controls
        :rtype: unicode
        r%   r   rH   r
   r
   r   r%   V  r   zEsimProfileInstance.sim_sidc                 C   r   )ze
        :returns: The status of the eSIM Profile
        :rtype: EsimProfileInstance.Status
        r&   r   rH   r
   r
   r   r&   ^  r   zEsimProfileInstance.statusc                 C   r   )zk
        :returns: Identifier of the eUICC that can claim the eSIM Profile
        :rtype: unicode
        r"   r   rH   r
   r
   r   r"   f  r   zEsimProfileInstance.eidc                 C   r   )zz
        :returns: Address of the SM-DP+ server from which the Profile will be downloaded
        :rtype: unicode
        rv   r   rH   r
   r
   r   rv   n  r   z%EsimProfileInstance.smdp_plus_addressc                 C   r   )z
        :returns: Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
        :rtype: unicode
        rw   r   rH   r
   r
   r   rw   v  r   zEsimProfileInstance.error_codec                 C   r   )z
        :returns: Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
        :rtype: unicode
        rx   r   rH   r
   r
   r   rx   ~  r   z!EsimProfileInstance.error_messagec                 C   r   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        ry   r   rH   r
   r
   r   ry     r   z EsimProfileInstance.date_createdc                 C   r   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        rz   r   rH   r
   r
   r   rz     r   z EsimProfileInstance.date_updatedc                 C   r   )za
        :returns: The absolute URL of the eSIM Profile resource
        :rtype: unicode
        r{   r   rH   r
   r
   r   r{     r   zEsimProfileInstance.urlc                 C   s
   | j  S )rU   )r   rV   rH   r
   r
   r   rV     s   
zEsimProfileInstance.fetchc                 C   rW   )rG   rX   c                 s   rY   rZ   r[   r\   r
   r
   r   r`     ra   z/EsimProfileInstance.__repr__.<locals>.<genexpr>z+<Twilio.Supersim.V1.EsimProfileInstance {}>rb   re   r
   r
   r   rI     rg   zEsimProfileInstance.__repr__)N)rK   rL   rM   rN   objectr.   r   propertyr   r?   rt   ru   r%   r&   r"   rv   rw   rx   ry   rz   r{   rV   rI   rP   r
   r
   r   r   r     s@    












	r   N)rN   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r3   rA   r   r
   r
   r
   r   <module>   s    &(*