
    d{iS)                         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	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 - Iam
    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	serializevalues)ApiResponse)InstanceResource)ListResource)Versionc                   V     e Zd Z G d de      Z	 dedeeef   f fdZ	defdZ
 xZS )NewApiKeyInstancec                       e Zd ZdZy)NewApiKeyInstance.Keytype
restrictedN)__name__
__module____qualname__
RESTRICTED     \/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/iam/v1/new_api_key.pyKeytyper      s    !
r   r   versionpayloadc                 x   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        y )Nsidfriendly_namedate_createddate_updatedsecretpolicy)super__init__getr   r    r   rfc2822_datetimer!   r"   r#   r$   )selfr   r   	__class__s      r   r&   zNewApiKeyInstance.__init__'   s    !")++e"4,3KK,H0;0L0LKK'1
 1<0L0LKK'1
 &-[[%:3:;;x3Hr   returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z!<Twilio.Iam.V1.NewApiKeyInstance>r   r)   s    r   __repr__zNewApiKeyInstance.__repr__5   s     3r   )r   r   r   objectr   r   r   strr   r&   r/   __classcell__r*   s   @r   r   r      s>    "& "I I$sCx. I3# 3r   r   c                   $    e Zd Zdef fdZej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   de
f
d	Zej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   def
d
Zej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   def
dZej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   de
f
dZej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   def
dZej                  ej                  ej                  fdedeee	f   dede	f   dee	e	f   def
dZdefdZ xZS )NewApiKeyListr   c                 2    t         |   |       d| _        y)zk
        Initialize the NewApiKeyList

        :param version: Version that contains the resource

        z/KeysN)r%   r&   _uri)r)   r   r*   s     r   r&   zNewApiKeyList.__init__A   s     	!	r   account_sidr    key_typer   r$   r+   c                     t        j                  |||t        j                  |      d      }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)
        
AccountSidFriendlyNameKeyTypePolicyContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r
   ofr	   r0   _versioncreate_with_response_infor7   r)   r8   r    r9   r$   rH   rI   s          r   _createzNewApiKeyList._createL   s     yy) -##**62	
 ))^-PQR"E.}}66tyytW 7 
 	
r   c                 `    | j                  ||||      \  }}}t        | j                  |      S )a  
        Create the NewApiKeyInstance

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param key_type:
        :param policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).

        :returns: The created NewApiKeyInstance
        r8   r    r9   r$   )rN   r   rK   r)   r8   r    r9   r$   r   _s          r   createzNewApiKeyList.createl   s<    " #'	 % 
A !88r   c                 |    | j                  ||||      \  }}}t        | j                  |      }t        |||      S )a  
        Create the NewApiKeyInstance and return response metadata

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param key_type:
        :param policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).

        :returns: ApiResponse with instance, status code, and headers
        rP   rH   status_coderI   )rN   r   rK   r   	r)   r8   r    r9   r$   r   rV   rI   instances	            r   create_with_http_infoz#NewApiKeyList.create_with_http_info   sK    " )-#'	 )5 )
%g %T]]G<k7SSr   c                   K   t        j                  |||t        j                  |      d      }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@   rA   rB   rC   rD   rE   N)r
   rJ   r	   r0   rK   create_with_response_info_asyncr7   rM   s          r   _create_asynczNewApiKeyList._create_async   s      yy) -##**62	
 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A;B=B>Bc                 |   K   | j                  ||||       d{   \  }}}t        | j                  |      S 7 w)a  
        Asynchronously create the NewApiKeyInstance

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param key_type:
        :param policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).

        :returns: The created NewApiKeyInstance
        rP   N)r\   r   rK   rQ   s          r   create_asynczNewApiKeyList.create_async   sL     " #00#'	 1 
 
A !88
s   <:<c                    K   | j                  ||||       d{   \  }}}t        | j                  |      }t        |||      S 7 ,w)a%  
        Asynchronously create the NewApiKeyInstance and return response metadata

        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
        :param key_type:
        :param policy: The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).

        :returns: ApiResponse with instance, status code, and headers
        rP   NrU   )r\   r   rK   r   rW   s	            r   create_with_http_info_asyncz)NewApiKeyList.create_with_http_info_async   s\     " /3.@.@#'	 /A /
 )
%g %T]]G<k7SS)
s   A
A-A
c                      y)r-   z<Twilio.Iam.V1.NewApiKeyList>r   r.   s    r   r/   zNewApiKeyList.__repr__   s     /r   )r   r   r   r   r&   r
   unsetr1   r   r0   tuplerN   r   rS   r   rY   r\   r^   r`   r/   r2   r3   s   @r   r5   r5   ?   s   	 	 -3LL?E||(.

 S&[)
 3V;<	

 ffn%
 

F -3LL?E||(.99 S&[)9 3V;<	9
 ffn%9 
98 -3LL?E||(.TT S&[)T 3V;<	T
 ffn%T 
T: -3LL?E||(.

 S&[)
 3V;<	

 ffn%
 

F -3LL?E||(.99 S&[)9 3V;<	9
 ffn%9 
98 -3LL?E||(.TT S&[)T 3V;<	T
 ffn%T 
T4/# /r   r5   N)__doc__r   typingr   r   r   r   twilio.baser   r	   r
   twilio.base.api_responser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r5   r   r   r   <module>rk      sC     - - 6 6 0 : 2 '#3( #3Ly/L y/r   