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

    Twilio - Flex
    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)InstanceContext)InstanceResource)ListResource)Versionc                        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ej                  fdeeef   dd fd	Zej                  fdeeef   dd fd
ZdefdZ xZS )PluginArchiveInstancea  
    :ivar sid: The unique string that we created to identify the Flex Plugin resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin resource and owns this resource.
    :ivar unique_name: The name that uniquely identifies this Flex Plugin resource.
    :ivar friendly_name: The friendly name this Flex Plugin resource.
    :ivar description: A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long
    :ivar archived: Whether the Flex Plugin is archived. The default value is false.
    :ivar date_created: The date and time in GMT when the Flex Plugin 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 Flex Plugin was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar url: The absolute URL of the Flex Plugin resource.
    versionpayloadsidc                 8   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        |j                  d	      | _        d|xs | j                  i| _        d | _        y )
Nr   account_sidunique_namefriendly_namedescriptionarchiveddate_createddate_updatedurl)super__init__getr   r   r   r   r   r   r   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   	__class__s       h/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/flex_api/v1/plugin_archive.pyr   zPluginArchiveInstance.__init__%   s     	!")++e"4*1++m*D*1++m*D,3KK,H*1++m*D(/J(?0;0L0LKK'1
 1<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: PluginArchiveContext for this PluginArchiveInstance
        r   r   )r!   PluginArchiveContext_versionr    r"   s    r$   _proxyzPluginArchiveInstance._proxy=   s9     == 0NN5)DM }}r%   flex_metadatac                 :    | j                   j                  |      S )
        Update the PluginArchiveInstance

        :param flex_metadata: The Flex-Metadata HTTP request header

        :returns: The updated PluginArchiveInstance
        r-   )r,   updater"   r-   s     r$   r1   zPluginArchiveInstance.updateL   s#     {{!!' " 
 	
r%   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine to update the PluginArchiveInstance

        :param flex_metadata: The Flex-Metadata HTTP request header

        :returns: The updated PluginArchiveInstance
        r0   N)r,   update_asyncr2   s     r$   r5   z"PluginArchiveInstance.update_asyncZ   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>z1PluginArchiveInstance.__repr__.<locals>.<genexpr>n        SDAq7>>!Q/S   !z,<Twilio.FlexApi.V1.PluginArchiveInstance {}>joinr    itemsr<   r"   contexts     r$   __repr__zPluginArchiveInstance.__repr__h   s6     ((SDNN<P<P<RSS=DDWMMr%   )N)r&   r)   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr,   r	   unsetr   objectr1   r5   rI   __classcell__r#   s   @r$   r   r      s    
 OS==)-c3h=>Fsm=0   39,,
"3;/
	 
 39,,
"3;/
	 
N# N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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 PluginArchiveContext

        :param version: Version that contains the resource
        :param sid: The SID of the Flex Plugin resource to archive.
        r   z$/PluginService/Plugins/{sid}/ArchiveN )r   r   r    r<   _uri)r"   r   r   r#   s      r$   r   zPluginArchiveContext.__init__t   sA     	! 3
 B:AASDNNS	r%   r-   r&   c                 N   t        j                  i       }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   | j
                  j                  d| j                  ||      }t        | j
                  || j                  d         S )r/   Flex-Metadataapplication/jsonAcceptPOSTmethoduridataheadersr   r(   )
r	   ofrP   
isinstancerN   r*   r1   rW   r   r    r"   r-   r`   ra   r   s        r$   r1   zPluginArchiveContext.update   s     yy}))B- V\\)=#.}'4GO$.--&&tyytW ' 
 %T]]GPUAVWWr%   c                 j  K   t        j                  i       }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   | j
                  j                  d| j                  ||       d{   }t        | j
                  || j                  d         S 7 )w)	r4   rY   rZ   r[   r\   r]   Nr   r(   )
r	   rb   rP   rc   rN   r*   r5   rW   r   r    rd   s        r$   r5   z!PluginArchiveContext.update_async   s      yy}))B- V\\)=#.}'4GO$.22tyytW 3 
 
 %T]]GPUAVWW	
s   BB3B1*B3c                     dj                  d | j                  j                         D              }dj                  |      S )r7   r8   c              3   F   K   | ]  \  }}d j                  ||        ywr:   r;   r=   s      r$   rA   z0PluginArchiveContext.__repr__.<locals>.<genexpr>   rB   rC   z+<Twilio.FlexApi.V1.PluginArchiveContext {}>rD   rG   s     r$   rI   zPluginArchiveContext.__repr__   s6     ((SDNN<P<P<RSS<CCGLLr%   )rJ   rK   rL   r   rN   r   r	   rP   r   rQ   r   r1   r5   rI   rR   rS   s   @r$   r)   r)   r   s{    T Tc T  39,,X"3;/X	X: 39,,X"3;/X	X8M# Mr%   r)   c                   P     e Zd Zdef 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 )PluginArchiveListr   c                 $    t         |   |       y)zo
        Initialize the PluginArchiveList

        :param version: Version that contains the resource

        N)r   r   )r"   r   r#   s     r$   r   zPluginArchiveList.__init__   s     	!r%   r   r&   c                 0    t        | j                  |      S zx
        Constructs a PluginArchiveContext

        :param sid: The SID of the Flex Plugin resource to archive.
        r(   r)   r*   r"   r   s     r$   r   zPluginArchiveList.get        $DMMs;;r%   c                 0    t        | j                  |      S rl   rm   rn   s     r$   __call__zPluginArchiveList.__call__   ro   r%   c                      y)r7   z%<Twilio.FlexApi.V1.PluginArchiveList>rV   r+   s    r$   rI   zPluginArchiveList.__repr__   s     7r%   )rJ   rK   rL   r   r   rN   r)   r   rq   rI   rR   rS   s   @r$   ri   ri      sC    " "<s <3 <<C <$8 <7# 7r%   ri   N)rM   r   typingr   r   r   r   twilio.baser   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r)   ri   rV   r%   r$   <module>ry      sS     - - + 8 : 2 'WN, WNtPM? PMf!7 !7r%   