o
    f>h8                     @   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 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)InstanceResource)ListResource)Version)Pagec                       sN   e Zd ZG dd deZ	 dedeeef f fddZ	defdd	Z
  ZS )
SettingsUpdateInstancec                   @   s   e Zd ZdZdZdZdZdS )SettingsUpdateInstance.Status	scheduledzin-progress
successfulfailedN)__name__
__module____qualname__	SCHEDULEDIN_PROGRESS
SUCCESSFULFAILED r   r   Z/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/settings_update.pyStatus   s
    r   versionpayloadc                    s   t  | |d| _|d| _|d| _|d| _|d| _t	|d| _
t	|d| _t	|d| _d S )	Nsidiccidsim_sidstatuspackagesdate_completeddate_createddate_updated)super__init__getr!   r"   r#   r$   r%   r
   iso8601_datetimer&   r'   r(   )selfr   r    	__class__r   r   r*   ,   s   
zSettingsUpdateInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z+<Twilio.Supersim.V1.SettingsUpdateInstance>r   r-   r   r   r   __repr__>   s   zSettingsUpdateInstance.__repr__)r   r   r   objectr   r   r   strr   r*   r4   __classcell__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 )SettingsUpdatePager    r0   c                 C   s   t | j|S )zt
        Build an instance of SettingsUpdateInstance

        :param payload: Payload response from the API
        )r   _version)r-   r    r   r   r   get_instanceJ   s   zSettingsUpdatePage.get_instancec                 C   r1   )r2   z'<Twilio.Supersim.V1.SettingsUpdatePage>r   r3   r   r   r   r4   R      zSettingsUpdatePage.__repr__N)	r   r   r   r   r6   r   r   r:   r4   r   r   r   r   r8   H   s    r8   c                       s4  e Zd Zdef fddZejejdd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dd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dd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dd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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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fddZ  ZS ) SettingsUpdateListr   c                    s   t  | d| _dS )zp
        Initialize the SettingsUpdateList

        :param version: Version that contains the resource

        z/SettingsUpdatesN)r)   r*   _uri)r-   r   r.   r   r   r*   ]   s   
zSettingsUpdateList.__init__Nsimr$   r   limit	page_sizer0   c                 C   s4   | j ||}| j|||d d}| j ||d S )ab  
        Streams SettingsUpdateInstance 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 sim: Filter the Settings Updates by a Super SIM's SID or UniqueName.
        :param &quot;SettingsUpdateInstance.Status&quot; status: Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`.
        :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?   )r9   read_limitspagestreamr-   r>   r$   r?   r@   limitsrC   r   r   r   rD   h   s   zSettingsUpdateList.streamc                    s<   | j ||}| j|||d dI dH }| j ||d S )aq  
        Asynchronously streams SettingsUpdateInstance 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 sim: Filter the Settings Updates by a Super SIM's SID or UniqueName.
        :param &quot;SettingsUpdateInstance.Status&quot; status: Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`.
        :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@   rA   Nr?   )r9   rB   
page_asyncstream_asyncrE   r   r   r   rH      s   
zSettingsUpdateList.stream_asyncc                 C   s   t | j||||dS )a  
        Lists SettingsUpdateInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str sim: Filter the Settings Updates by a Super SIM's SID or UniqueName.
        :param &quot;SettingsUpdateInstance.Status&quot; status: Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`.
        :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@   )listrD   r-   r>   r$   r?   r@   r   r   r   rJ      s   zSettingsUpdateList.listc                    s*   dd | j ||||dI dH 2 I dH S )a  
        Asynchronously lists SettingsUpdateInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str sim: Filter the Settings Updates by a Super SIM's SID or UniqueName.
        :param &quot;SettingsUpdateInstance.Status&quot; status: Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`.
        :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 )Nr   ).0recordr   r   r   
<listcomp>   s
    z1SettingsUpdateList.list_async.<locals>.<listcomp>rI   N)rH   rK   r   r   r   
list_async   s   
zSettingsUpdateList.list_async
page_tokenpage_numberc           	      C   sN   t |||||d}t ddi}d|d< | jjd| j||d}t| j|S )aQ  
        Retrieve a single page of SettingsUpdateInstance records from the API.
        Request is executed immediately

        :param sim: Filter the Settings Updates by a Super SIM's SID or UniqueName.
        :param status: Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`.
        :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 SettingsUpdateInstance
        Simr   	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr9   rC   r=   r8   	r-   r>   r$   rP   rQ   r@   datar_   responser   r   r   rC      s   

zSettingsUpdateList.pagec           	         sV   t |||||d}t ddi}d|d< | jjd| j||dI dH }t| j|S )	a`  
        Asynchronously retrieve a single page of SettingsUpdateInstance records from the API.
        Request is executed immediately

        :param sim: Filter the Settings Updates by a Super SIM's SID or UniqueName.
        :param status: Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`.
        :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 SettingsUpdateInstance
        rR   rV   rW   rX   rY   rZ   r[   N)r   r`   r9   rG   r=   r8   ra   r   r   r   rG     s   

zSettingsUpdateList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )a  
        Retrieve a specific page of SettingsUpdateInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SettingsUpdateInstance
        rZ   )r9   domaintwiliorequestr8   r-   rd   rc   r   r   r   get_page3  s   	zSettingsUpdateList.get_pagec                    s&   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of SettingsUpdateInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SettingsUpdateInstance
        rZ   N)r9   re   rf   request_asyncr8   rh   r   r   r   get_page_async?  s   	z!SettingsUpdateList.get_page_asyncc                 C   r1   )r2   z'<Twilio.Supersim.V1.SettingsUpdateList>r   r3   r   r   r   r4   K  r;   zSettingsUpdateList.__repr__)r   r   r   r   r*   r   unsetr   r6   r5   r   intr   r   rD   r	   rH   r   rJ   rO   r8   rC   rG   ri   rk   r4   r7   r   r   r.   r   r<   [   s    





!


"


#





)





'r<   N)__doc__r   typingr   r   r   r   r   r   r	   twilio.baser
   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r8   r<   r   r   r   r   <module>   s    $/