U
    ^g%i0                     @   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eeeef d fddZed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.
    :ivar flags:
    )versionpayloadc                    sX   t  | |d| _|d| _t|d| _t|d| _|d| _	d S )Nsidfriendly_namedate_createddate_updatedflags)
super__init__getr   r   r
   Zrfc2822_datetimer   r   r   )selfr   r   	__class__ ^/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/iam/v1/get_api_keys.pyr   "   s    zGetApiKeysInstance.__init__returnc                 C   s   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                   @   s2   e Zd Zeeef edddZedddZdS )GetApiKeysPage)r   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_instance;   s    zGetApiKeysPage.get_instancer    c                 C   s   dS )r"   z<Twilio.Iam.V1.GetApiKeysPage>r   r#   r   r   r   r$   C   s    zGetApiKeysPage.__repr__N)	r%   r&   r'   r   r)   r   r   r-   r$   r   r   r   r   r+   9   s   r+   c                       s  e Zd Zed fddZejddfeee	f e
e e
e ee dddZejddfeee	f e
e e
e ee ddd	Zejddfeee	f e
e e
e ee dd
dZejddfeee	f e
e e
e ee dddZejejejejfeee	f eee	f eee	f eee	f edddZejejejejfeee	f eee	f eee	f eee	f edddZeedddZeedddZedddZ  ZS )GetApiKeysList)r   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   N   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
        r2   r0   r2   r1   )r,   read_limitspagestreamr   r0   r1   r2   Zlimitsr5   r   r   r   r6   Y   s    zGetApiKeysList.streamc                    s8   | 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
        r2   r3   Nr1   )r,   r4   
page_asyncstream_asyncr7   r   r   r   r9   t   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
        r0   r1   r2   )listr6   r   r0   r1   r2   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)r9   r<   r   r   r   
list_async   s    
zGetApiKeysList.list_async)r0   
page_tokenpage_numberr2   r!   c                 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
        Z
AccountSidZ	PageTokenr   ZPageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr,   r5   r/   r+   r   r0   rA   rB   r2   datarM   responser   r   r   r5      s     	   zGetApiKeysList.pagec                    sR   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
        rC   rD   rE   rF   rG   rH   rI   N)r   rN   r,   r8   r/   r+   rO   r   r   r   r8      s     	   zGetApiKeysList.page_async)
target_urlr!   c                 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
        rH   )r,   domaintwiliorequestr+   r   rR   rQ   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
        rH   N)r,   rS   rT   Zrequest_asyncr+   rV   r   r   r   get_page_async   s    	zGetApiKeysList.get_page_asyncr    c                 C   s   dS )r"   z<Twilio.Iam.V1.GetApiKeysList>r   r#   r   r   r   r$   ,  s    zGetApiKeysList.__repr__)r%   r&   r'   r   r   r   unsetr   r)   objectr   intr   r   r6   r	   r9   r   r;   r@   r+   r5   r8   rW   rX   r$   r*   r   r   r   r   r.   L   s|   



 



&



$r.   N)r(   r   typingr   r   r   r   r   r   r	   Ztwilio.baser
   r   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   r+   r.   r   r   r   r   <module>   s   $ 