o
    f>h=                     @   s   d Z ddlmZ ddl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 - 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Optional)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       sb   e Zd ZdZdedeeef f fddZe	ddd	Z
dd
dZdddZdefddZ  ZS )AuthTokenPromotionInstancea}  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
    :ivar auth_token: The promoted Auth Token that must be used to authenticate future API requests.
    :ivar date_created: The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar url: The URI for this resource, relative to `https://accounts.twilio.com`
    versionpayloadc                    s^   t  | |d| _|d| _t|d| _t|d| _|d| _	d | _
d S )Naccount_sid
auth_tokendate_createddate_updatedurl)super__init__getr   r   r   iso8601_datetimer   r   r   _context)selfr   r   	__class__ _/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/accounts/v1/auth_token_promotion.pyr   !   s   
z#AuthTokenPromotionInstance.__init__returnAuthTokenPromotionContextc                 C   s   | j du rt| j| _ | 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: AuthTokenPromotionContext for this AuthTokenPromotionInstance
        N)r   r   _versionr   r   r   r   _proxy0   s
   
z!AuthTokenPromotionInstance._proxyc                 C   s
   | j  S )r
        Update the AuthTokenPromotionInstance


        :returns: The updated AuthTokenPromotionInstance
        )r"   updater!   r   r   r   r$   >   s   
z!AuthTokenPromotionInstance.updatec                    s   | j  I dH S )
        Asynchronous coroutine to update the AuthTokenPromotionInstance


        :returns: The updated AuthTokenPromotionInstance
        N)r"   update_asyncr!   r   r   r   r&   G   s   z'AuthTokenPromotionInstance.update_asyncc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z/<Twilio.Accounts.V1.AuthTokenPromotionInstance>r   r!   r   r   r   __repr__P      z#AuthTokenPromotionInstance.__repr__)r   r   )r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr"   r$   r&   r)   __classcell__r   r   r   r   r      s    

		r   c                       L   e Zd Z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	  Z
S )r   r   c                    s   t  | d| _dS )zv
        Initialize the AuthTokenPromotionContext

        :param version: Version that contains the resource
        z/AuthTokens/PromoteN)r   r   _urir   r   r   r   r   r   \   s   
z"AuthTokenPromotionContext.__init__r   c                 C   s>   t i }t i }d|d< | jjd| j||d}t| j|S )r#   application/jsonAcceptPOSTmethoduridataheaders)r   ofr    r$   r3   r   r   r;   r<   r   r   r   r   r$   f   s   


z AuthTokenPromotionContext.updatec                    sF   t i }t i }d|d< | jjd| j||dI dH }t| j|S )r%   r5   r6   r7   r8   N)r   r=   r    r&   r3   r   r>   r   r   r   r&   y   s   


z&AuthTokenPromotionContext.update_asyncc                 C   r'   )r(   z.<Twilio.Accounts.V1.AuthTokenPromotionContext>r   r!   r   r   r   r)      r*   z"AuthTokenPromotionContext.__repr__)r+   r,   r-   r   r   r   r$   r&   r/   r)   r1   r   r   r   r   r   Z   s
    
r   c                       r2   )AuthTokenPromotionListr   c                    s   t  | dS )zt
        Initialize the AuthTokenPromotionList

        :param version: Version that contains the resource

        N)r   r   r4   r   r   r   r      s   zAuthTokenPromotionList.__init__r   c                 C   
   t | jS z9
        Constructs a AuthTokenPromotionContext

        r   r    r!   r   r   r   r         
zAuthTokenPromotionList.getc                 C   r@   rA   rB   r!   r   r   r   __call__   rC   zAuthTokenPromotionList.__call__c                 C   r'   )r(   z+<Twilio.Accounts.V1.AuthTokenPromotionList>r   r!   r   r   r   r)      s   zAuthTokenPromotionList.__repr__)r+   r,   r-   r   r   r   r   rD   r/   r)   r1   r   r   r   r   r?      s
    	r?   N)r.   r   typingr   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r   r?   r   r   r   r   <module>   s    B<