o
    f>h/                     @   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 - Iam
    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                       s@   e Zd ZdZdedeeef f fddZdefddZ	  Z
S )	GetApiKeysInstancea  
    :ivar sid: The unique string that we created to identify the Key resource.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar date_created: The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar date_updated: The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    versionpayloadc                    sL   t  | |d| _|d| _t|d| _t|d| _d S )Nsidfriendly_namedate_createddate_updated)	super__init__getr   r   r
   rfc2822_datetimer   r   )selfr   r   	__class__ R/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/iam/v1/get_api_keys.pyr   !   s   
zGetApiKeysInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z"<Twilio.Iam.V1.GetApiKeysInstance>r   r   r   r   r   __repr__-   s   zGetApiKeysInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   r$   __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 )GetApiKeysPager   r    c                 C   s   t | j|S )zp
        Build an instance of GetApiKeysInstance

        :param payload: Payload response from the API
        )r   _version)r   r   r   r   r   get_instance9   s   zGetApiKeysPage.get_instancec                 C   r!   )r"   z<Twilio.Iam.V1.GetApiKeysPage>r   r#   r   r   r   r$   A      zGetApiKeysPage.__repr__N)	r%   r&   r'   r   r)   r   r   r-   r$   r   r   r   r   r+   7   s    r+   c                       s  e Zd Zdef fddZejddfdeee	f de
e de
e dee fd	d
Zejddfdeee	f de
e de
e dee fddZejddfdeee	f de
e de
e dee fddZejddfdeee	f de
e de
e de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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dedefddZdedefddZdefddZ  ZS )GetApiKeysListr   c                    s   t  | d| _dS )zl
        Initialize the GetApiKeysList

        :param version: Version that contains the resource

        z/KeysN)r   r   _uri)r   r   r   r   r   r   L   s   
zGetApiKeysList.__init__Naccount_sidlimit	page_sizer    c                 C   s2   | j ||}| j||d d}| j ||d S )a  
        Streams GetApiKeysInstance 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 account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :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
        r3   r1   r3   r2   )r,   read_limitspagestreamr   r1   r2   r3   limitsr6   r   r   r   r7   W   s   zGetApiKeysList.streamc                    s:   | j ||}| j||d dI dH }| j ||d S )a  
        Asynchronously streams GetApiKeysInstance 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 account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :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
        r3   r4   Nr2   )r,   r5   
page_asyncstream_asyncr8   r   r   r   r;   r   s   zGetApiKeysList.stream_asyncc                 C   s   t | j|||dS )a  
        Lists GetApiKeysInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :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
        r1   r2   r3   )listr7   r   r1   r2   r3   r   r   r   r=      s   zGetApiKeysList.listc                    s(   dd | j |||dI dH 2 I dH S )a  
        Asynchronously lists GetApiKeysInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :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
    z-GetApiKeysList.list_async.<locals>.<listcomp>r<   N)r;   r>   r   r   r   
list_async   s   
zGetApiKeysList.list_async
page_tokenpage_numberc                 C   sL   t ||||d}t ddi}d|d< | jjd| j||d}t| j|S )a  
        Retrieve a single page of GetApiKeysInstance records from the API.
        Request is executed immediately

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :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 GetApiKeysInstance
        
AccountSid	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr,   r6   r0   r+   r   r1   rC   rD   r3   datarR   responser   r   r   r6      s   	
zGetApiKeysList.pagec                    sT   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 GetApiKeysInstance records from the API.
        Request is executed immediately

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :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 GetApiKeysInstance
        rE   rI   rJ   rK   rL   rM   rN   N)r   rS   r,   r:   r0   r+   rT   r   r   r   r:      s   	
zGetApiKeysList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )z
        Retrieve a specific page of GetApiKeysInstance records from the API.
        Request is executed immediately

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

        :returns: Page of GetApiKeysInstance
        rM   )r,   domaintwiliorequestr+   r   rW   rV   r   r   r   get_page  s   	zGetApiKeysList.get_pagec                    s&   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of GetApiKeysInstance records from the API.
        Request is executed immediately

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

        :returns: Page of GetApiKeysInstance
        rM   N)r,   rX   rY   request_asyncr+   r[   r   r   r   get_page_async  s   	zGetApiKeysList.get_page_asyncc                 C   r!   )r"   z<Twilio.Iam.V1.GetApiKeysList>r   r#   r   r   r   r$   *  r.   zGetApiKeysList.__repr__)r%   r&   r'   r   r   r   unsetr   r)   objectr   intr   r   r7   r	   r;   r   r=   rB   r+   r6   r:   r\   r^   r$   r*   r   r   r   r   r/   J   s    







 




&




$r/   N)r(   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   r+   r/   r   r   r   r   <module>   s    $