
    m>hI                         d Z ddlmZ ddlmZmZmZ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 G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Microvisor
    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ListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       ZdefdZdefd	Zdd
ZddZdedd fdZdedd fdZdefdZ xZS )AccountSecretInstancez
    :ivar key: The secret key; up to 100 characters.
    :ivar date_rotated:
    :ivar url: The absolute URL of the Secret.
    versionpayloadkeyc                 
   t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        |j                  d      | _        d|xs | j                  i| _        d | _	        y )Nr   date_rotatedurl)
super__init__getr   r   iso8601_datetimer   r   	_solution_context)selfr   r   r   	__class__s       l/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/microvisor/v1/account_secret.pyr   zAccountSecretInstance.__init__    st     	!")++e"40;0L0LKK'1
 #*++e"4 3?$((
 9=    returnc                     | j                   )t        | j                  | 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: AccountSecretContext for this AccountSecretInstance
        r   r   )r   AccountSecretContext_versionr   r    s    r"   _proxyzAccountSecretInstance._proxy0   s9     == 0NN5)DM }}r#   c                 6    | j                   j                         S )p
        Deletes the AccountSecretInstance


        :returns: True if delete succeeds, False otherwise
        )r*   deleter)   s    r"   r-   zAccountSecretInstance.delete?   s     {{!!##r#   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the AccountSecretInstance


        :returns: True if delete succeeds, False otherwise
        N)r*   delete_asyncr)   s    r"   r0   z"AccountSecretInstance.delete_asyncH   s!      [[--////   '%'c                 6    | j                   j                         S )g
        Fetch the AccountSecretInstance


        :returns: The fetched AccountSecretInstance
        )r*   fetchr)   s    r"   r4   zAccountSecretInstance.fetchQ   s     {{  ""r#   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the AccountSecretInstance


        :returns: The fetched AccountSecretInstance
        N)r*   fetch_asyncr)   s    r"   r7   z!AccountSecretInstance.fetch_asyncZ   s!      [[,,....r1   valuec                 :    | j                   j                  |      S )
        Update the AccountSecretInstance

        :param value: The secret value; up to 4096 characters.

        :returns: The updated AccountSecretInstance
        r8   )r*   updater    r8   s     r"   r<   zAccountSecretInstance.updatec   s#     {{!! " 
 	
r#   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine to update the AccountSecretInstance

        :param value: The secret value; up to 4096 characters.

        :returns: The updated AccountSecretInstance
        r;   N)r*   update_asyncr=   s     r"   r@   z"AccountSecretInstance.update_asynco   s1      [[-- . 
 
 	
 
s    )')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>z1AccountSecretInstance.__repr__.<locals>.<genexpr>   "     S<RDAq7>>!Q/<R   !z/<Twilio.Microvisor.V1.AccountSecretInstance {}>joinr   itemsrG   r    contexts     r"   __repr__zAccountSecretInstance.__repr__{   s6     ((SDNN<P<P<RSS@GGPPr#   )N)r$   r'   )r$   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr*   boolr-   r0   r4   r7   r<   r@   rT   __classcell__r!   s   @r"   r   r      s     OS==)-c3h=>Fsm=   $ $0D 0#/

C 

$; 



 

0G 

Q# Qr#   r   c                        e Zd Z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de	fd
Zd	ede	fdZdefdZ xZS )r'   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the AccountSecretContext

        :param version: Version that contains the resource
        :param key: The secret key; up to 100 characters.
        r   z/Secrets/{key}N )r   r   r   rG   _uri)r    r   r   r!   s      r"   r   zAccountSecretContext.__init__   s@     	! 3
 ,$++=dnn=	r#   r$   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r,   DELETEmethoduriheaders)r   ofr(   r-   ra   r    rg   s     r"   r-   zAccountSecretContext.delete   s1     ))B-}}##8G#TTr#   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r/   rc   rd   N)r   rh   r(   r0   ra   ri   s     r"   r0   z!AccountSecretContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r3   application/jsonAcceptGETrd   r   r&   )r   rh   r(   r4   ra   r   r   r    rg   r   s      r"   r4   zAccountSecretContext.fetch   s]     ))B-.--%%U		7%S$MMu%
 	
r#   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r6   rl   rm   rn   rd   Nr   r&   )r   rh   r(   r7   ra   r   r   ro   s      r"   r7   z AccountSecretContext.fetch_async   sr      ))B-.11dii 2 
 
 %MMu%
 	
	
s   AA4A2	*A4r8   c                 
   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
r:   Value!application/x-www-form-urlencodedContent-Typerl   rm   POSTre   rf   datarg   r   r&   )r   rh   r(   r<   ra   r   r   r    r8   rw   rg   r   s        r"   r<   zAccountSecretContext.update   s     yy

 ))B-"E.--&&tyytW ' 
 %T]]GPUAVWWr#   c                 &  K   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)r?   rr   rs   rt   rl   rm   ru   rv   Nr   r&   )r   rh   r(   r@   ra   r   r   rx   s        r"   r@   z!AccountSecretContext.update_async   s      yy

 ))B-"E.22tyytW 3 
 
 %T]]GPUAVWW	
s   A#B%B&*Bc                     dj                  d | j                  j                         D              }dj                  |      S )rB   rC   c              3   F   K   | ]  \  }}d j                  ||        ywrE   rF   rH   s      r"   rL   z0AccountSecretContext.__repr__.<locals>.<genexpr>  rM   rN   z.<Twilio.Microvisor.V1.AccountSecretContext {}>rO   rR   s     r"   rT   zAccountSecretContext.__repr__  s6     ((SDNN<P<P<RSS?FFwOOr#   )rU   rV   rW   r   rY   r   r[   r-   r0   r   r4   r7   r<   r@   rT   r\   r]   s   @r"   r'   r'      s    > >c >
U 
U
D 

, 
(
#8 
,XC X$9 X4X X0E X4P# Pr#   r'   c                   2    e Zd Zdeeef   defdZdefdZy)AccountSecretPager   r$   c                 .    t        | j                  |      S )zs
        Build an instance of AccountSecretInstance

        :param payload: Payload response from the API
        )r   r(   )r    r   s     r"   get_instancezAccountSecretPage.get_instance  s     %T]]G<<r#   c                      y)rB   z(<Twilio.Microvisor.V1.AccountSecretPage>r`   r)   s    r"   rT   zAccountSecretPage.__repr__"       :r#   N)	rU   rV   rW   r   rY   r   r   r   rT   r`   r#   r"   r}   r}     s*    =DcN =7L =:# :r#   r}   c            	       <    e Zd Zdef fdZdededefdZdededefdZ	 	 dde	e
   d	e	e
   dee   fd
Z	 	 dde	e
   d	e	e
   dee   fdZ	 	 dde	e
   d	e	e
   dee   fdZ	 	 dde	e
   d	e	e
   dee   fdZej&                  ej&                  ej&                  fdeeef   dee
ef   d	ee
ef   defdZej&                  ej&                  ej&                  fdeeef   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defdZdedefdZdefdZ xZS )AccountSecretListr   c                 2    t         |   |       d| _        y)zo
        Initialize the AccountSecretList

        :param version: Version that contains the resource

        z/SecretsN)r   r   ra   )r    r   r!   s     r"   r   zAccountSecretList.__init__-  s     	!	r#   r   r8   r$   c                     t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )z
        Create the AccountSecretInstance

        :param key: The secret key; up to 100 characters.
        :param value: The secret value; up to 4096 characters.

        :returns: The created AccountSecretInstance
        Keyrr   rt   rs   rl   rm   ru   rv   )r   rh   r(   createra   r   r    r   r8   rw   rg   r   s         r"   r   zAccountSecretList.create8  s     yy
 ))^-PQR"E.--&&tyytW ' 
 %T]]G<<r#   c                   K   t        j                  ||d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	z
        Asynchronously create the AccountSecretInstance

        :param key: The secret key; up to 100 characters.
        :param value: The secret value; up to 4096 characters.

        :returns: The created AccountSecretInstance
        r   rt   rs   rl   rm   ru   rv   N)r   rh   r(   create_asyncra   r   r   s         r"   r   zAccountSecretList.create_asyncT  s      yy
 ))^-PQR"E.22tyytW 3 
 
 %T]]G<<	
s   A&B(B)Blimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )ac  
        Streams AccountSecretInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   r   )r(   read_limitspagestreamr    r   r   limitsr   s        r"   r   zAccountSecretList.streamp  sJ    ( **5)<yy6+#6y7}}##D&/::r#   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)ar  
        Asynchronously streams AccountSecretInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   Nr   )r(   r   
page_asyncstream_asyncr   s        r"   r   zAccountSecretList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a   
        Lists AccountSecretInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   r   )listr   )r    r   r   s      r"   r   zAccountSecretList.list  s(    & KK#  
 	
r#   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists AccountSecretInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   N)r   )r    r   r   records       r"   
list_asynczAccountSecretList.list_async  sY     * '+&7&7# '8 ' ! !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Retrieve a single page of AccountSecretInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of AccountSecretInstance
        	PageTokenr   PageSizert   rs   rl   rm   rn   re   rf   paramsrg   )r   rh   r(   r   ra   r}   r    r   r   r   rw   rg   responses          r"   r   zAccountSecretList.page  sy      yy'#%
 ))^-PQR.==%%diig & 
 !99r#   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously retrieve a single page of AccountSecretInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of AccountSecretInstance
        r   rt   rs   rl   rm   rn   r   N)r   rh   r(   r   ra   r}   r   s          r"   r   zAccountSecretList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 !99
s   A"B$A?%B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of AccountSecretInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of AccountSecretInstance
        rn   )r(   domaintwiliorequestr}   r    r   r   s      r"   get_pagezAccountSecretList.get_page  s7     ==''..66ujI 99r#   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of AccountSecretInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of AccountSecretInstance
        rn   N)r(   r   r   request_asyncr}   r   s      r"   get_page_asyncz AccountSecretList.get_page_async%  sD      --44BB5*UU 99 Vs   4AAAc                 0    t        | j                  |      S zn
        Constructs a AccountSecretContext

        :param key: The secret key; up to 100 characters.
        r&   r'   r(   r    r   s     r"   r   zAccountSecretList.get1       $DMMs;;r#   c                 0    t        | j                  |      S r   r   r   s     r"   __call__zAccountSecretList.__call__9  r   r#   c                      y)rB   z(<Twilio.Microvisor.V1.AccountSecretList>r`   r)   s    r"   rT   zAccountSecretList.__repr__A  r   r#   )NN) rU   rV   rW   r   r   rY   r   r   r   r   intr	   r   r
   r   r   r   r   r   unsetr   objectr}   r   r   r   r   r'   r   r   rT   r\   r]   s   @r"   r   r   +  s=   	 	=# =c =.C =8=c =# =:O =<  $#';}; C=; 
'	(	;6  $#'A}A C=A 
,	-	A6  $#'
}
 C=
 
#	$	
8  $#'
}
 C=
 
#	$	
: *0*0,,(.	:#v+&: 3;': f%	:
 
:F *0*0,,(.	:#v+&: 3;': f%	:
 
:B
:3 
:+< 
:
:s 
:7H 
:<s <3 <<C <$8 <:# :r#   r   N)rX   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r'   r}   r   r`   r#   r"   <module>r      sg     L L L + 8 : 2 ' !iQ, iQXPP? PPf: :&\: \:r#   