
    d{i'B                         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 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 - Verify
    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)InstanceContext)InstanceResource)ListResource)Versionc            
            e Zd Z G d de      Z	 	 ddedeeef   dede	e   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 )AccessTokenInstancec                       e Zd ZdZy)AccessTokenInstance.FactorTypespushN)__name__
__module____qualname__PUSH     h/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/verify/v2/service/access_token.pyFactorTypesr      s    r   r   versionpayloadservice_sidsidc                 f   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        t        j                  |j                  d	            | _        t        j                  |j                  d
            | _        ||xs | j                  d| _        d | _        y )Nr   account_sidr   entity_identityfactor_typefactor_friendly_nametokenurlttldate_createdr   r   )super__init__getr   r!   r   r"   r#   r$   r%   r&   r   integerr'   iso8601_datetimer(   	_solution_context)selfr   r   r   r   	__class__s        r   r+   zAccessTokenInstance.__init__+   s     	!")++e"4*1++m*D*1++m*D.5kk:K.LHOI
 4;;;?U3V!$+KK$8
")++e"4"-"5"5gkk%6H"I0;0L0LKK'1

 '?$((
 7;r   returnc                     | j                   7t        | j                  | j                  d   | j                  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: AccessTokenContext for this AccessTokenInstance
        r   r   r)   )r0   AccessTokenContext_versionr/   r1   s    r   _proxyzAccessTokenInstance._proxyI   sE     == . NN=9NN5)DM
 }}r   c                 6    | j                   j                         S )c
        Fetch the AccessTokenInstance


        :returns: The fetched AccessTokenInstance
        )r8   fetchr7   s    r   r;   zAccessTokenInstance.fetchY   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the AccessTokenInstance


        :returns: The fetched AccessTokenInstance
        N)r8   fetch_asyncr7   s    r   r>   zAccessTokenInstance.fetch_asyncb   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the AccessTokenInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r8   fetch_with_http_infor7   s    r   rA   z(AccessTokenInstance.fetch_with_http_infok   s     {{//11r   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the AccessTokenInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r8   fetch_with_http_info_asyncr7   s    r   rC   z.AccessTokenInstance.fetch_with_http_info_asynct   s!      [[;;====r?   c                     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/AccessTokenInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z)<Twilio.Verify.V2.AccessTokenInstance {}>joinr/   itemsrJ   r1   contexts     r   __repr__zAccessTokenInstance.__repr__}   s6     ((SDNN<P<P<RSS:AA'JJr   )N)r3   r5   )r3   r   )r   r   r   objectr   r   r   strr   r   r+   propertyr8   r;   r>   r
   rA   rC   rW   __classcell__r2   s   @r   r   r      s    f $ ";; c3h; 	;
 c];<  #/2k 2>+ >K# Kr   r   c                        e Zd Zdede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 )r5   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the AccessTokenContext

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.
        :param sid: A 34 character string that uniquely identifies this Access Token.
        r)   z*/Services/{service_sid}/AccessTokens/{sid}Nr   r*   r+   r/   rJ   _uri)r1   r   r   r   r2   s       r   r+   zAccessTokenContext.__init__   sG     	! '
 H@GG 
nn
	r   r3   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r	   ofr6   fetch_with_response_infor`   r1   rh   s     r   _fetchzAccessTokenContext._fetch   sB     ))B-.}}55dii 6 
 	
r   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )r:   r   r   r)   )rl   r   r6   r/   r1   r   _s      r   r;   zAccessTokenContext.fetch   sD     A"MM}5u%	
 	
r   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the AccessTokenInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r)   datastatus_coderh   )rl   r   r6   r/   r
   r1   r   rs   rh   instances        r   rA   z'AccessTokenContext.fetch_with_http_info   sS     )-%g&MM}5u%	
 k7SSr   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rb   rc   rd   re   N)r	   ri   r6   fetch_with_response_info_asyncr`   rk   s     r   _fetch_asynczAccessTokenContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)r=   Nr   r   r)   )rx   r   r6   r/   rn   s      r   r>   zAccessTokenContext.fetch_async   sS      #//11A"MM}5u%	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the AccessTokenInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r)   rq   )rx   r   r6   r/   r
   rt   s        r   rC   z-AccessTokenContext.fetch_with_http_info_async   sc      /3.?.?.A(A%g&MM}5u%	
 k7SS )Bs   A"A A
A"c                     dj                  d | j                  j                         D              }dj                  |      S )rE   rF   c              3   F   K   | ]  \  }}d j                  ||        ywrH   rI   rK   s      r   rO   z.AccessTokenContext.__repr__.<locals>.<genexpr>   rP   rQ   z(<Twilio.Verify.V2.AccessTokenContext {}>rR   rU   s     r   rW   zAccessTokenContext.__repr__   s6     ((SDNN<P<P<RSS9@@IIr   )r   r   r   r   rY   r+   tuplerl   r   r;   r
   rA   rx   r>   rC   rW   r[   r\   s   @r   r5   r5      sy    
 
c 
 
&
 
 
* 
Tk T 
E 
 
#6 
T+ T J# Jr   r5   c                       e Zd Zdedef fdZej                  ej                  fdedddeee	f   dee
e	f   d	ef
d
Zej                  ej                  fdedddeee	f   dee
e	f   d	ef
dZej                  ej                  fdedddeee	f   dee
e	f   d	ef
dZej                  ej                  fdedddeee	f   dee
e	f   d	ef
dZej                  ej                  fdedddeee	f   dee
e	f   d	ef
dZej                  ej                  fdedddeee	f   dee
e	f   d	ef
dZded	efdZded	efdZd	efdZ xZS )AccessTokenListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the AccessTokenList

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.

        r   z$/Services/{service_sid}/AccessTokensNr   r_   )r1   r   r   r2   s      r   r+   zAccessTokenList.__init__  sA     	! ;
 B:AASDNNS	r   identityr#   r   r$   r'   r3   c                     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)
        Identity
FactorTypeFactorFriendlyNameTtlContent-Type!application/x-www-form-urlencodedrb   rc   POSTrf   rg   rr   rh   )r	   ri   r6   create_with_response_infor`   r1   r   r#   r$   r'   rr   rh   s          r   _createzAccessTokenList._create  sv     yy$)&:	
 ))^-PQR"E.}}66tyytW 7 
 	
r   c                 ~    | j                  ||||      \  }}}t        | j                  || j                  d         S )aF  
        Create the AccessTokenInstance

        :param identity: The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID.
        :param factor_type:
        :param factor_friendly_name: The friendly name of the factor that is going to be created with this access token
        :param ttl: How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60.

        :returns: The created AccessTokenInstance
        r   r#   r$   r'   r   r   )r   r   r6   r/   r1   r   r#   r$   r'   r   ro   s          r   createzAccessTokenList.create6  sL    " #!5	 % 
A #MM7}0M
 	
r   c                     | j                  ||||      \  }}}t        | j                  || j                  d         }t	        |||      S )aw  
        Create the AccessTokenInstance and return response metadata

        :param identity: The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID.
        :param factor_type:
        :param factor_friendly_name: The friendly name of the factor that is going to be created with this access token
        :param ttl: How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60.

        :returns: ApiResponse with instance, status code, and headers
        r   r   r   rq   )r   r   r6   r/   r
   	r1   r   r#   r$   r'   r   rs   rh   ru   s	            r   create_with_http_infoz%AccessTokenList.create_with_http_infoQ  s[    " )-#!5	 )5 )
%g 'MM7}0M
 k7SSr   c                    K   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   r   rb   rc   r   r   N)r	   ri   r6   create_with_response_info_asyncr`   r   s          r   _create_asynczAccessTokenList._create_asyncm  s      yy$)&:	
 ))^-PQR"E.]]BBtyytW C 
 
 	
 
s   A(A1*A/+A1c                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         S 7 -w)aU  
        Asynchronously create the AccessTokenInstance

        :param identity: The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID.
        :param factor_type:
        :param factor_friendly_name: The friendly name of the factor that is going to be created with this access token
        :param ttl: How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60.

        :returns: The created AccessTokenInstance
        r   Nr   r   )r   r   r6   r/   r   s          r   create_asynczAccessTokenList.create_async  s\     " #00#!5	 1 
 
A #MM7}0M
 	

s   AA	.Ac                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a  
        Asynchronously create the AccessTokenInstance and return response metadata

        :param identity: The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID.
        :param factor_type:
        :param factor_friendly_name: The friendly name of the factor that is going to be created with this access token
        :param ttl: How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60.

        :returns: ApiResponse with instance, status code, and headers
        r   Nr   r   rq   )r   r   r6   r/   r
   r   s	            r   create_with_http_info_asyncz+AccessTokenList.create_with_http_info_async  sl     " /3.@.@#!5	 /A /
 )
%g 'MM7}0M
 k7SS)
s   AA<Ar   c                 L    t        | j                  | j                  d   |      S z
        Constructs a AccessTokenContext

        :param sid: A 34 character string that uniquely identifies this Access Token.
        r   r)   r5   r6   r/   r1   r   s     r   r,   zAccessTokenList.get  %     "MMt~~m'D#
 	
r   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r   __call__zAccessTokenList.__call__  r   r   c                      y)rE   z"<Twilio.Verify.V2.AccessTokenList>r   r7   s    r   rW   zAccessTokenList.__repr__  s     4r   )r   r   r   r   rY   r+   r	   unsetr   rX   intr}   r   r   r   r
   r   r   r   r   r5   r,   r   rW   r[   r\   s   @r   r   r     sf   T Tc T( 4:<<"(,,

 7
 $CK0	

 3;
 

H 4:<<"(,,

 7
 $CK0	

 3;
 

> 4:<<"(,,TT 7T $CK0	T
 3;T 
T@ 4:<<"(,,

 7
 $CK0	

 3;
 

H 4:<<"(,,

 7
 $CK0	

 3;
 

> 4:<<"(,,TT 7T $CK0	T
 3;T 
T8
s 
1 

C 
$6 
4# 4r   r   N)__doc__r   typingr   r   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   r5   r   r   r   r   <module>r      sX     - - + 0 8 : 2 'kK* kK\zJ zJzZ4l Z4r   