o
    f>h                     @   s   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
 d
eZG dd deZG dd deZdS )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                       s   e Zd ZdZ	ddedeeef dee f fddZ	e
dd
dZejfdeeef dd fddZejfdeeef dd fddZdefddZ  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.
    Nversionpayloadsidc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _t	
|d| _t	
|d| _|d	| _d|pG| ji| _d | _d S )
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__ Y/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/flex_api/v1/plugin_archive.pyr   %   s"   

zPluginArchiveInstance.__init__returnPluginArchiveContextc                 C   s&   | j du rt| j| jd 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
        Nr   r   )r   r%   _versionr   r   r"   r"   r#   _proxy=   s   
zPluginArchiveInstance._proxyflex_metadatac                 C   s   | j j|dS )
        Update the PluginArchiveInstance

        :param flex_metadata: The Flex-Metadata HTTP request header

        :returns: The updated PluginArchiveInstance
        r*   )r)   updater   r*   r"   r"   r#   r-   L   s   
zPluginArchiveInstance.updatec                    s   | j j|dI dH S )
        Asynchronous coroutine to update the PluginArchiveInstance

        :param flex_metadata: The Flex-Metadata HTTP request header

        :returns: The updated PluginArchiveInstance
        r,   N)r)   update_asyncr.   r"   r"   r#   r0   Z   s   
z"PluginArchiveInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr"   r"   r#   	<genexpr>n       z1PluginArchiveInstance.__repr__.<locals>.<genexpr>z,<Twilio.FlexApi.V1.PluginArchiveInstance {}>joinr   itemsr7   r   contextr"   r"   r#   __repr__h      
zPluginArchiveInstance.__repr__)N)r$   r%   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr)   r   unsetr   objectr-   r0   rC   __classcell__r"   r"   r    r#   r      s2    




r   c                       st   e Zd Zdedef fddZejfdeee	f de
fddZejfdeee	f de
fd	d
ZdefddZ  ZS )r%   r   r   c                    s.   t  | d|i| _djdi | j| _dS )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}/ArchiveNr"   )r   r   r   r7   _uri)r   r   r   r    r"   r#   r   t   s   zPluginArchiveContext.__init__r*   r$   c                 C   sh   t i }t i }|t ju st|tr|r||d< d|d< | jjd| j||d}t| j|| j	d dS )r+   Flex-Metadataapplication/jsonAcceptPOSTmethoduridataheadersr   r&   )
r   ofrK   
isinstancerI   r'   r-   rN   r   r   r   r*   rV   rW   r   r"   r"   r#   r-      s   



zPluginArchiveContext.updatec                    sp   t i }t i }|t ju st|tr|r||d< d|d< | jjd| j||dI dH }t| j|| j	d dS )	r/   rO   rP   rQ   rR   rS   Nr   r&   )
r   rX   rK   rY   rI   r'   r0   rN   r   r   rZ   r"   r"   r#   r0      s   



z!PluginArchiveContext.update_asyncc                 C   r1   )r2   r3   c                 s   r4   r5   r6   r8   r"   r"   r#   r<      r=   z0PluginArchiveContext.__repr__.<locals>.<genexpr>z+<Twilio.FlexApi.V1.PluginArchiveContext {}>r>   rA   r"   r"   r#   rC      rD   zPluginArchiveContext.__repr__)rE   rF   rG   r   rI   r   r   rK   r   rL   r   r-   r0   rC   rM   r"   r"   r    r#   r%   r   s    



r%   c                       sT   e Zd Zdef fddZdedefddZdedefdd	Zdefd
dZ	  Z
S )PluginArchiveListr   c                    s   t  | dS )zo
        Initialize the PluginArchiveList

        :param version: Version that contains the resource

        N)r   r   )r   r   r    r"   r#   r      s   zPluginArchiveList.__init__r   r$   c                 C      t | j|dS zx
        Constructs a PluginArchiveContext

        :param sid: The SID of the Flex Plugin resource to archive.
        r&   r%   r'   r   r   r"   r"   r#   r         zPluginArchiveList.getc                 C   r\   r]   r^   r_   r"   r"   r#   __call__   r`   zPluginArchiveList.__call__c                 C   s   dS )r2   z%<Twilio.FlexApi.V1.PluginArchiveList>r"   r(   r"   r"   r#   rC      s   zPluginArchiveList.__repr__)rE   rF   rG   r   r   rI   r%   r   ra   rC   rM   r"   r"   r    r#   r[      s
    	r[   N)rH   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%   r[   r"   r"   r"   r#   <module>   s    ZS