o
    �¨Êh1  ã                   @   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ddd„Zddd„Zejejejfd	d
„Z	dd„ Z
ejejfdd„Zdd„ Zdd„ Zdd„ Z‡  ZS )ÚAwsListú  c                    s.   t t| ƒ |¡ i | _djdi | j¤Ž| _dS )zí
        Initialize the AwsList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.accounts.v1.credential.aws.AwsList
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsList
        z/Credentials/AWSN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversion©Ú	__class__r
   úX/var/www/html/env/lib/python3.10/site-packages/twilio/rest/accounts/v1/credential/aws.pyr      s   	zAwsList.__init__Nc                 C   s6   | j  ||¡}| j|d d�}| j  ||d |d ¡S )aº  
        Streams AwsInstance 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 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.accounts.v1.credential.aws.AwsInstance]
        Ú	page_size)r   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r
   r
   r   r   #   s   zAwsList.streamc                 C   s   t | j||d�ƒS )aZ  
        Lists AwsInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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.accounts.v1.credential.aws.AwsInstance]
        )r   r   )Úlistr   )r   r   r   r
   r
   r   r   :   s   zAwsList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )a¶  
        Retrieve a single page of AwsInstance records from the API.
        Request is executed immediately

        :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 AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsPage
        )Ú	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   ÚAwsPager   )r   Ú
page_tokenÚpage_numberr   r"   Úresponser
   r
   r   r   L   s   ýzAwsList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a.  
        Retrieve a specific page of AwsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsPage
        r    )r   ÚdomainÚtwilioÚrequestr$   r   )r   Ú
target_urlr'   r
   r
   r   Úget_pagec   s
   

þzAwsList.get_pagec                 C   s2   t  |||dœ¡}| jjd| j|d�}t| j|ƒS )a;  
        Create a new AwsInstance

        :param unicode credentials: The credentials
        :param unicode friendly_name: The friendly_name
        :param unicode account_sid: The account_sid

        :returns: Newly created AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
        )ÚCredentialsÚFriendlyNameÚ
AccountSidÚPOST©Údata)r   r#   r   Úcreater   ÚAwsInstance)r   ÚcredentialsÚfriendly_nameÚaccount_sidr2   Úpayloadr
   r
   r   r3   t   s   ýýzAwsList.createc                 C   ó   t | j|d�S ©zÍ
        Constructs a AwsContext

        :param sid: The sid

        :returns: twilio.rest.accounts.v1.credential.aws.AwsContext
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
        ©Úsid©Ú
AwsContextr   ©r   r<   r
   r
   r   ÚgetŽ   ó   	zAwsList.getc                 C   r9   r:   r=   r?   r
   r
   r   Ú__call__™   rA   zAwsList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Accounts.V1.AwsList>r
   ©r   r
   r
   r   Ú__repr__¤   ó   zAwsList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úunsetr   r,   r3   r@   rB   rF   Ú__classcell__r
   r
   r   r   r      s    


ÿ
ÿr   c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )r$   r	   c                    s   t t| ƒ ||¡ || _dS )a%  
        Initialize the AwsPage

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

        :returns: twilio.rest.accounts.v1.credential.aws.AwsPage
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsPage
        N)r   r$   r   r   )r   r   r'   Úsolutionr   r
   r   r   ±   s   

zAwsPage.__init__c                 C   s   t | j|ƒS )z÷
        Build an instance of AwsInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.accounts.v1.credential.aws.AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
        )r4   r   )r   r8   r
   r
   r   Úget_instanceÀ   s   	zAwsPage.get_instancec                 C   rC   )rD   z<Twilio.Accounts.V1.AwsPage>r
   rE   r
   r
   r   rF   Ë   rG   zAwsPage.__repr__)rH   rI   rJ   rK   r   rO   rF   rM   r
   r
   r   r   r$   ®   s
    r$   c                       sF   e Zd ZdZ‡ fdd„Zdd„ Zejfdd„Zdd	„ Z	d
d„ Z
‡  ZS )r>   r	   c                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )a  
        Initialize the AwsContext

        :param Version version: Version that contains the resource
        :param sid: The sid

        :returns: twilio.rest.accounts.v1.credential.aws.AwsContext
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
        r<   z/Credentials/AWS/{sid}Nr
   )r   r>   r   r   r   r   )r   r   r<   r   r
   r   r   Ø   s   

zAwsContext.__init__c                 C   s4   t  i ¡}| jjd| j|d�}t| j|| jd d�S )ú�
        Fetch a AwsInstance

        :returns: Fetched AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
        r    r!   r<   r;   )r   r#   r   Úfetchr   r4   r   )r   r"   r8   r
   r
   r   rQ   è   s   
ýzAwsContext.fetchc                 C   s8   t  d|i¡}| jjd| j|d�}t| j|| jd d�S )úË
        Update the AwsInstance

        :param unicode friendly_name: The friendly_name

        :returns: Updated AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
        r.   r0   r1   r<   r;   )r   r#   r   Úupdater   r4   r   )r   r6   r2   r8   r
   r
   r   rS   ù   s   	ýzAwsContext.updatec                 C   s   | j  d| j¡S )úz
        Deletes the AwsInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rU   r   rE   r
   r
   r   rU     s   zAwsContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rD   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr
   r
   r   Ú	<genexpr>  ó   € z&AwsContext.__repr__.<locals>.<genexpr>z"<Twilio.Accounts.V1.AwsContext {}>©Újoinr   Úitemsr   ©r   Úcontextr
   r
   r   rF     ó   
zAwsContext.__repr__)rH   rI   rJ   rK   r   rQ   r   rL   rS   rU   rF   rM   r
   r
   r   r   r>   Õ   s    	r>   c                       sœ   e Zd Zd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dd„ Zejfdd„Zdd„ Zdd„ Z‡  ZS )r4   r	   Nc                    sf   t t| ƒ |¡ |d |d |d t |d ¡t |d ¡|d dœ| _d| _d|p.| jd i| _dS )	zµ
        Initialize the AwsInstance

        :returns: twilio.rest.accounts.v1.credential.aws.AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
        r<   r7   r6   Údate_createdÚdate_updatedÚurl)r<   r7   r6   rg   rh   ri   N)r   r4   r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   r8   r<   r   r
   r   r   #  s   ú
zAwsInstance.__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: AwsContext for this AwsInstance
        :rtype: twilio.rest.accounts.v1.credential.aws.AwsContext
        Nr<   r;   )rl   r>   r   r   rE   r
   r
   r   Ú_proxy:  s   
	zAwsInstance._proxyc                 C   ó
   | j d S )z;
        :returns: The sid
        :rtype: unicode
        r<   ©rk   rE   r
   r
   r   r<   G  ó   
zAwsInstance.sidc                 C   rn   )zC
        :returns: The account_sid
        :rtype: unicode
        r7   ro   rE   r
   r
   r   r7   O  rp   zAwsInstance.account_sidc                 C   rn   )zE
        :returns: The friendly_name
        :rtype: unicode
        r6   ro   rE   r
   r
   r   r6   W  rp   zAwsInstance.friendly_namec                 C   rn   )zE
        :returns: The date_created
        :rtype: datetime
        rg   ro   rE   r
   r
   r   rg   _  rp   zAwsInstance.date_createdc                 C   rn   )zE
        :returns: The date_updated
        :rtype: datetime
        rh   ro   rE   r
   r
   r   rh   g  rp   zAwsInstance.date_updatedc                 C   rn   )z;
        :returns: The url
        :rtype: unicode
        ri   ro   rE   r
   r
   r   ri   o  rp   zAwsInstance.urlc                 C   ó
   | j  ¡ S )rP   )rm   rQ   rE   r
   r
   r   rQ   w  ó   
zAwsInstance.fetchc                 C   s   | j j|d�S )rR   )r6   )rm   rS   )r   r6   r
   r
   r   rS   €  rA   zAwsInstance.updatec                 C   rq   )rT   )rm   rU   rE   r
   r
   r   rU   ‹  rr   zAwsInstance.deletec                 C   rV   )rD   rW   c                 s   rX   rY   rZ   r[   r
   r
   r   r_   ›  r`   z'AwsInstance.__repr__.<locals>.<genexpr>z#<Twilio.Accounts.V1.AwsInstance {}>ra   rd   r
   r
   r   rF   ”  rf   zAwsInstance.__repr__)N)rH   rI   rJ   rK   r   Úpropertyrm   r<   r7   r6   rg   rh   ri   rQ   r   rL   rS   rU   rF   rM   r
   r
   r   r   r4      s*    






		r4   N)rK   Útwilio.baser   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r$   r>   r4   r
   r
   r
   r   Ú<module>   s    'K