
    d{i                         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 dd	lmZ  G d
 de      Z G d de      Z G d de      Zy)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)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc                   |     e Zd ZdZdedeeef   f fdZe	dd       Z
ddZddZdefd	Zdefd
ZdefdZ x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                 Z   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        d | _
        y )Naccount_sid
auth_tokendate_createddate_updatedurl)super__init__getr   r   r   iso8601_datetimer   r   r   _context)selfr   r   	__class__s      j/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/accounts/v1/auth_token_promotion.pyr   z#AuthTokenPromotionInstance.__init__"   s    !*1++m*D)0\)B0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4=A    returnc                 f    | j                   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
        )r   AuthTokenPromotionContext_versionr   s    r   _proxyz!AuthTokenPromotionInstance._proxy1   s-     == 5DM }}r    c                 6    | j                   j                         S zr
        Update the AuthTokenPromotionInstance


        :returns: The updated AuthTokenPromotionInstance
        )r&   updater%   s    r   r)   z!AuthTokenPromotionInstance.update?   s     {{!!##r    c                 R   K   | j                   j                          d{   S 7 wz
        Asynchronous coroutine to update the AuthTokenPromotionInstance


        :returns: The updated AuthTokenPromotionInstance
        N)r&   update_asyncr%   s    r   r,   z'AuthTokenPromotionInstance.update_asyncH   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Update the AuthTokenPromotionInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r&   update_with_http_infor%   s    r   r/   z0AuthTokenPromotionInstance.update_with_http_infoQ   s     {{0022r    c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to update the AuthTokenPromotionInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r&   update_with_http_info_asyncr%   s    r   r1   z6AuthTokenPromotionInstance.update_with_http_info_asyncZ   s!      [[<<>>>>r-   c                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z/<Twilio.Accounts.V1.AuthTokenPromotionInstance> r%   s    r   __repr__z#AuthTokenPromotionInstance.__repr__c   s     Ar    )r!   r#   )r!   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr&   r)   r,   r	   r/   r1   r5   __classcell__r   s   @r   r   r      sj    B B$sCx. B  $03{ 3?; ?A# Ar    r   c                   x     e Zd Zdef fdZdefdZdefdZde	fdZ
defdZdefdZde	fd	Zdefd
Z xZS )r#   r   c                 2    t         |   |       d| _        y)zv
        Initialize the AuthTokenPromotionContext

        :param version: Version that contains the resource
        z/AuthTokens/PromoteN)r   r   _urir   r   r   s     r   r   z"AuthTokenPromotionContext.__init__o   s     	!)	r    r!   c                     t        j                  i       }t        j                  i       }d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptPOSTmethoduridataheaders)r   ofr$   update_with_response_infor@   r   rI   rJ   s      r   _updatez!AuthTokenPromotionContext._updatey   sQ     yy}))B-.}}66tyytW 7 
 	
r    c                 V    | j                         \  }}}t        | j                  |      S r(   )rN   r   r$   r   r   _s      r   r)   z AuthTokenPromotionContext.update   s&     A)$--AAr    c                 r    | j                         \  }}}t        | j                  |      }t        |||      S )z
        Update the AuthTokenPromotionInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        rI   status_coderJ   )rN   r   r$   r	   r   r   rT   rJ   instances        r   r/   z/AuthTokenPromotionContext.update_with_http_info   s5     )-%g-dmmWEk7SSr    c                    K   t        j                  i       }t        j                  i       }d|d<   | j                  j                  d| j                  ||       d{   S 7 w)z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        rC   rD   rE   rF   N)r   rK   r$   update_with_response_info_asyncr@   rM   s      r   _update_asyncz'AuthTokenPromotionContext._update_async   s`      yy}))B-.]]BBtyytW C 
 
 	
 
s   AA%A#A%c                 r   K   | j                          d{   \  }}}t        | j                  |      S 7 wr+   )rY   r   r$   rP   s      r   r,   z&AuthTokenPromotionContext.update_async   s5      #0022A)$--AA 3s   757c                    K   | j                          d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)z
        Asynchronous coroutine to update the AuthTokenPromotionInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        NrS   )rY   r   r$   r	   rU   s        r   r1   z5AuthTokenPromotionContext.update_with_http_info_async   sE      /3.@.@.B(B%g-dmmWEk7SS )Cs   AA-Ac                      y)r3   z.<Twilio.Accounts.V1.AuthTokenPromotionContext>r4   r%   s    r   r5   z"AuthTokenPromotionContext.__repr__   s     @r    )r6   r7   r8   r   r   tuplerN   r   r)   r	   r/   rY   r,   r1   r:   r5   r<   r=   s   @r   r#   r#   m   so    * *
 
"B2 B	T{ 	T
U 
"B$> B	T; 	T@# @r    r#   c                   H     e Zd Zdef fdZdefdZdefdZdefdZ	 xZ
S )AuthTokenPromotionListr   c                 $    t         |   |       y)zt
        Initialize the AuthTokenPromotionList

        :param version: Version that contains the resource

        N)r   r   rA   s     r   r   zAuthTokenPromotionList.__init__   s     	!r    r!   c                 ,    t        | j                        S z9
        Constructs a AuthTokenPromotionContext

        r#   r$   r%   s    r   r   zAuthTokenPromotionList.get       
 )77r    c                 ,    t        | j                        S rb   rc   r%   s    r   __call__zAuthTokenPromotionList.__call__   rd   r    c                      y)r3   z+<Twilio.Accounts.V1.AuthTokenPromotionList>r4   r%   s    r   r5   zAuthTokenPromotionList.__repr__   s     =r    )r6   r7   r8   r   r   r#   r   rf   r:   r5   r<   r=   s   @r   r_   r_      s5    " "8. 883 8=# =r    r_   N)r9   r   typingr   r   r   twilio.baser   r   twilio.base.api_responser	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r#   r_   r4   r    r   <module>ro      sV     & & + 0 8 : 2 'QA!1 QAh_@ _@D=\ =r    