o
    /i!L                     @   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 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 )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Accounts
    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)InstanceContext)InstanceResource)ListResource)Version)Pagec                       s   e Zd ZdZ	ddedeeef dee f fddZ	e
dd
dZdefddZdefddZdddZdddZejfdeeef dd fddZejfdeeef dd fddZdefddZ  ZS )AwsInstancea  
    :ivar sid: The unique string that we created to identify the AWS resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AWS resource.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar date_created: The date and time in GMT when 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 when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar url: The URI for this resource, relative to `https://accounts.twilio.com`
    Nversionpayloadsidc                    sz   t  | |d| _|d| _|d| _t|d| _t|d| _	|d| _
d|p5| ji| _d | _d S )Nr   account_sidfriendly_namedate_createddate_updatedurl)super__init__getr   r   r   r
   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   	__class__ a/var/www/html/philips/venv/lib/python3.10/site-packages/twilio/rest/accounts/v1/credential/aws.pyr   %   s   

zAwsInstance.__init__return
AwsContextc                 C   s&   | j du rt| j| jd d| _ | j S )z
        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
        Nr   r   )r   r&   _versionr   r    r#   r#   r$   _proxy:   s   
zAwsInstance._proxyc                 C   
   | j  S )f
        Deletes the AwsInstance


        :returns: True if delete succeeds, False otherwise
        )r*   deleter)   r#   r#   r$   r-   I      
zAwsInstance.deletec                       | j  I dH S )
        Asynchronous coroutine that deletes the AwsInstance


        :returns: True if delete succeeds, False otherwise
        N)r*   delete_asyncr)   r#   r#   r$   r1   R      zAwsInstance.delete_asyncc                 C   r+   )S
        Fetch the AwsInstance


        :returns: The fetched AwsInstance
        )r*   fetchr)   r#   r#   r$   r4   [   r.   zAwsInstance.fetchc                    r/   )m
        Asynchronous coroutine to fetch the AwsInstance


        :returns: The fetched AwsInstance
        N)r*   fetch_asyncr)   r#   r#   r$   r6   d   r2   zAwsInstance.fetch_asyncr   c                 C   s   | j j|dS )
        Update the AwsInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.

        :returns: The updated AwsInstance
        r   )r*   updater    r   r#   r#   r$   r9   m   s   zAwsInstance.updatec                    s   | j j|dI dH S )
        Asynchronous coroutine to update the AwsInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.

        :returns: The updated AwsInstance
        r8   N)r*   update_asyncr:   r#   r#   r$   r<   y   s   
zAwsInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr#   r#   r$   	<genexpr>       z'AwsInstance.__repr__.<locals>.<genexpr>z#<Twilio.Accounts.V1.AwsInstance {}>joinr   itemsrC   r    contextr#   r#   r$   __repr__      
zAwsInstance.__repr__N)r%   r&   )r%   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr*   boolr-   r1   r4   r6   r   unsetr   objectr9   r<   rO   __classcell__r#   r#   r!   r$   r      s0    

	
	
	 	

r   c                       s   e Zd Zdedef fddZdefddZdefdd	Zde	fd
dZ
de	fddZejfdeeef de	fddZejfdeeef de	fddZdefddZ  ZS )r&   r   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the AwsContext

        :param version: Version that contains the resource
        :param sid: The Twilio-provided string that uniquely identifies the AWS resource to update.
        r   z/Credentials/AWS/{sid}Nr#   )r   r   r   rC   _uri)r    r   r   r!   r#   r$   r      s   zAwsContext.__init__r%   c                 C   s   | j jd| jdS )r,   DELETEmethoduri)r(   r-   r\   r)   r#   r#   r$   r-      s   zAwsContext.deletec                    s   | j jd| jdI dH S )r0   r]   r^   N)r(   r1   r\   r)   r#   r#   r$   r1      s
   zAwsContext.delete_asyncc                 C   s(   | j jd| jd}t| j || jd dS )r3   GETr^   r   r'   )r(   r4   r\   r   r   r    r   r#   r#   r$   r4      s   zAwsContext.fetchc                    s0   | j jd| jdI dH }t| j || jd dS )r5   ra   r^   Nr   r'   )r(   r6   r\   r   r   rb   r#   r#   r$   r6      s   zAwsContext.fetch_asyncr   c                 C   s8   t d|i}| jjd| j|d}t| j|| jd dS )r7   FriendlyNamePOSTr_   r`   datar   r'   )r   ofr(   r9   r\   r   r   r    r   rf   r   r#   r#   r$   r9      s   zAwsContext.updatec                    s@   t d|i}| jjd| j|dI dH }t| j|| jd dS )r;   rc   rd   re   Nr   r'   )r   rg   r(   r<   r\   r   r   rh   r#   r#   r$   r<      s   
zAwsContext.update_asyncc                 C   r=   )r>   r?   c                 s   r@   rA   rB   rD   r#   r#   r$   rH     rI   z&AwsContext.__repr__.<locals>.<genexpr>z"<Twilio.Accounts.V1.AwsContext {}>rJ   rM   r#   r#   r$   rO     rP   zAwsContext.__repr__)rR   rS   rT   r   rV   r   rX   r-   r1   r   r4   r6   r   rY   r   rZ   r9   r<   rO   r[   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 )AwsPager   r%   c                 C   s   t | j|S )zi
        Build an instance of AwsInstance

        :param payload: Payload response from the API
        )r   r(   rb   r#   r#   r$   get_instance  s   zAwsPage.get_instancec                 C      dS )r>   z<Twilio.Accounts.V1.AwsPage>r#   r)   r#   r#   r$   rO         zAwsPage.__repr__N)	rR   rS   rT   r   rV   r   r   rj   rO   r#   r#   r#   r$   ri     s    ri   c                	       s   e Zd Zdef fddZejejfdedeee	f deee	f de
fdd	Zejejfdedeee	f deee	f de
fd
dZ		d)dee dee dee
 fddZ		d)dee dee dee
 fddZ		d)dee dee dee
 fddZ		d)dee dee dee
 fddZejejej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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defd#d$Zd"edefd%d&Zdefd'd(Z  ZS )*AwsListr   c                    s   t  | d| _dS )ze
        Initialize the AwsList

        :param version: Version that contains the resource

        z/Credentials/AWSN)r   r   r\   )r    r   r!   r#   r$   r   *  s   
zAwsList.__init__credentialsr   r   r%   c                 C   2   t |||d}| jjd| j|d}t| j|S )aR  
        Create the AwsInstance

        :param credentials: A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param account_sid: The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request.

        :returns: The created AwsInstance
        Credentialsrc   
AccountSidrd   re   )r   rg   r(   creater\   r   r    rn   r   r   rf   r   r#   r#   r$   rs   5  s   zAwsList.createc                    :   t |||d}| jjd| j|dI dH }t| j|S )aa  
        Asynchronously create the AwsInstance

        :param credentials: A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param account_sid: The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request.

        :returns: The created AwsInstance
        rp   rd   re   N)r   rg   r(   create_asyncr\   r   rt   r#   r#   r$   rv   T  s   zAwsList.create_asyncNlimit	page_sizec                 C   s0   | j ||}| j|d d}| j ||d S )aY  
        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 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
        rx   rx   rw   )r(   read_limitspagestreamr    rw   rx   limitsr{   r#   r#   r$   r|   s  s   zAwsList.streamc                    s8   | j ||}| j|d dI dH }| j ||d S )ah  
        Asynchronously 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 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
        rx   ry   Nrw   )r(   rz   
page_asyncstream_asyncr}   r#   r#   r$   r     s   zAwsList.stream_asyncc                 C   s   t | j||dS )a  
        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 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
        rw   rx   )listr|   r    rw   rx   r#   r#   r$   r     s   zAwsList.listc                    s&   dd | j ||dI dH 2 I dH S )a  
        Asynchronously 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 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 rQ   r#   )rE   recordr#   r#   r$   
<listcomp>  s
    z&AwsList.list_async.<locals>.<listcomp>r   N)r   r   r#   r#   r$   
list_async  s   
zAwsList.list_async
page_tokenpage_numberc                 C   ro   )ak  
        Retrieve a single page of AwsInstance records from the API.
        Request is executed immediately

        :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 AwsInstance
        	PageTokenr   PageSizera   r_   r`   params)r   rg   r(   r{   r\   ri   r    r   r   rx   rf   responser#   r#   r$   r{     s   zAwsList.pagec                    ru   )az  
        Asynchronously retrieve a single page of AwsInstance records from the API.
        Request is executed immediately

        :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 AwsInstance
        r   ra   r   N)r   rg   r(   r   r\   ri   r   r#   r#   r$   r     s   zAwsList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )z
        Retrieve a specific page of AwsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AwsInstance
        ra   )r(   domaintwiliorequestri   r    r   r   r#   r#   r$   get_page  s   	zAwsList.get_pagec                    s&   | j jjd|I dH }t| j |S )z
        Asynchronously retrieve a specific page of AwsInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AwsInstance
        ra   N)r(   r   r   request_asyncri   r   r#   r#   r$   get_page_async  s   	zAwsList.get_page_asyncr   c                 C      t | j|dS z
        Constructs a AwsContext

        :param sid: The Twilio-provided string that uniquely identifies the AWS resource to update.
        r'   r&   r(   r    r   r#   r#   r$   r   *     zAwsList.getc                 C   r   r   r   r   r#   r#   r$   __call__2  r   zAwsList.__call__c                 C   rk   )r>   z<Twilio.Accounts.V1.AwsList>r#   r)   r#   r#   r$   rO   :  rl   zAwsList.__repr__)NN) rR   rS   rT   r   r   r   rY   rV   r   rZ   r   rs   rv   r   intr   r|   r	   r   r   r   r   ri   r{   r   r   r   r&   r   r   rO   r[   r#   r#   r!   r$   rm   )  s    


"


!











rm   N)rU   r   typingr   r   r   r   r   r   r	   twilio.baser
   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r&   ri   rm   r#   r#   r#   r$   <module>   s    $w 