
    d{i                         d Z ddlmZ ddl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
e      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Api
    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Union)deserializevalues)ApiResponse)InstanceResource)ListResource)Versionc                   F     e Zd ZdZdedeeef   def fdZdefdZ	 xZ
S )NewKeyInstancea+  
    :ivar sid: The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar date_created: The date and time in GMT that the API Key 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 new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar secret: The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`).  **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
    versionpayloadaccount_sidc                 ^   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        d|i| _
        y )Nsidfriendly_namedate_createddate_updatedsecretr   )super__init__getr   r   r   rfc2822_datetimer   r   r   	_solution)selfr   r   r   	__class__s       c/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/api/v2010/account/new_key.pyr   zNewKeyInstance.__init__"   s    !")++e"4,3KK,H0;0L0LKK'1
 1<0L0LKK'1
 &-[[%: ;
    returnc                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        yw)z{}={}N)format).0kvs      r    	<genexpr>z*NewKeyInstance.__repr__.<locals>.<genexpr>9   s     SDAq7>>!Q/Ss   !z$<Twilio.Api.V2010.NewKeyInstance {}>)joinr   itemsr'   )r   contexts     r    __repr__zNewKeyInstance.__repr__3   s6     ((SDNN<P<P<RSS5<<WEEr!   )__name__
__module____qualname____doc__r   r   strr   r   r/   __classcell__r   s   @r    r   r      s8    
 
$sCx. 
s 
"F# Fr!   r   c                   `    e Zd Zdedef fdZej                  fdeee	f   de
fdZej                  fdeee	f   defdZej                  fdeee	f   defdZej                  fdeee	f   de
fd	Zej                  fdeee	f   defd
Zej                  fdeee	f   defdZdefdZ xZS )
NewKeyListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the NewKeyList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource.

        r   z!/Accounts/{account_sid}/Keys.jsonN )r   r   r   r'   _uri)r   r   r   r   s      r    r   zNewKeyList.__init__?   s@     	! ;
 ?7>>PP	r!   r   r"   c                     t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        FriendlyNameContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r	   of_versioncreate_with_response_infor;   r   r   rF   rG   s       r    _createzNewKeyList._createO   so     yy

 ))^-PQR"E.}}66tyytW 7 
 	
r!   c                 x    | j                  |      \  }}}t        | j                  || j                  d         S )z
        Create the NewKeyInstance

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

        :returns: The created NewKeyInstance
        r   r   r   )rL   r   rI   r   r   r   r   _s       r    createzNewKeyList.createf   s;     =AAMM7}0M
 	
r!   c                     | j                  |      \  }}}t        | j                  || j                  d         }t	        |||      S )a  
        Create the NewKeyInstance and return response metadata

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

        :returns: ApiResponse with instance, status code, and headers
        rN   r   rO   rF   status_coderG   )rL   r   rI   r   r
   r   r   r   rU   rG   instances         r    create_with_http_infoz NewKeyList.create_with_http_infou   sJ     )-=(Q%g!MM7}0M
 k7SSr!   c                    K   t        j                  d|i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        r=   r>   r?   r@   rA   rB   rC   N)r	   rH   rI   create_with_response_info_asyncr;   rK   s       r    _create_asynczNewKeyList._create_async   s~      yy

 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A%A.'A,(A.c                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         S 7 -w)z
        Asynchronously create the NewKeyInstance

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

        :returns: The created NewKeyInstance
        rN   Nr   rO   )r[   r   rI   r   rP   s       r    create_asynczNewKeyList.create_async   sK      #00}0MMAMM7}0M
 	
 Ns   AA.Ac                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a   
        Asynchronously create the NewKeyInstance and return response metadata

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

        :returns: ApiResponse with instance, status code, and headers
        rN   Nr   rO   rT   )r[   r   rI   r   r
   rV   s         r    create_with_http_info_asyncz&NewKeyList.create_with_http_info_async   sc      /3.@.@' /A /
 )
%g "MM7}0M
 k7SS)
s   AA<Ac                      y)r$   z<Twilio.Api.V2010.NewKeyList>r:   )r   s    r    r/   zNewKeyList.__repr__   s     /r!   )r0   r1   r2   r   r4   r   r	   unsetr   objecttuplerL   r   rR   r
   rX   r[   r]   r_   r/   r5   r6   s   @r    r8   r8   =   s   Q Qc Q  ;A,, 
U3;%7 
5 
0 39,,
"3;/
	
  39,,T"3;/T	T" 39,,
"3;/
	
4 39,,
"3;/
	
  39,,T"3;/T	T$/# /r!   r8   N)r3   r   typingr   r   r   r   twilio.baser   r	   twilio.base.api_responser
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r8   r:   r!   r    <module>rj      sB     - - + 0 : 2 '!F% !FHH/ H/r!   