U
    ^g%i                     @   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eeeef ee d fddZ	e
dddd	Zejfeeef d d
ddZejfeeef d d
ddZed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|p| 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   Ziso8601_datetimer   r   r   	_solution_context)selfr   r   r   	__class__ e/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/flex_api/v1/plugin_archive.pyr   %   s$     zPluginArchiveInstance.__init__PluginArchiveContextreturnc                 C   s&   | j dk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_metadatar%   c                 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"   r1   Z   s    
z"PluginArchiveInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr!   r!   r"   	<genexpr>n   s     z1PluginArchiveInstance.__repr__.<locals>.<genexpr>z,<Twilio.FlexApi.V1.PluginArchiveInstance {}>joinr   itemsr6   r   contextr!   r!   r"   __repr__h   s    zPluginArchiveInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr)   r   unsetr   objectr.   r1   rA   __classcell__r!   r!   r   r"   r      s(     
 

r   c                       sn   e Zd Zeed fddZejfeee	f e
dddZejfeee	f e
dddZed	d
dZ  ZS )r#   )r   r   c                    s*   t  | d|i| _djf | 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}/ArchiveN)r   r   r   r6   _uri)r   r   r   r   r!   r"   r   t   s
     zPluginArchiveContext.__init__r*   c                 C   sh   t i }t i }|t jks4t|tr,|r4||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   ofrH   
isinstancerF   r'   r.   rK   r   r   r   r+   rS   rT   r   r!   r!   r"   r.      s"    

   zPluginArchiveContext.updatec                    sn   t i }t i }|t jks4t|tr,|r4||d< d|d< | jjd| j||dI dH }t| j|| j	d dS )	r0   rL   rM   rN   rO   rP   Nr   r&   )
r   rU   rH   rV   rF   r'   r1   rK   r   r   rW   r!   r!   r"   r1      s"    

   z!PluginArchiveContext.update_asyncr$   c                 C   s$   d dd | j D }d|S )r2   r3   c                 s   s   | ]\}}d  ||V  qdS r4   r5   r7   r!   r!   r"   r;      s     z0PluginArchiveContext.__repr__.<locals>.<genexpr>z+<Twilio.FlexApi.V1.PluginArchiveContext {}>r<   r?   r!   r!   r"   rA      s    zPluginArchiveContext.__repr__)rB   rC   rD   r   rF   r   r   rH   r   rI   r   r.   r1   rA   rJ   r!   r!   r   r"   r#   r   s   

r#   c                       sP   e Zd Zed fddZeedddZeedddZed	d
dZ	  Z
S )PluginArchiveList)r   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   s   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      s    zPluginArchiveList.getc                 C   s   t | j|dS rY   rZ   r[   r!   r!   r"   __call__   s    zPluginArchiveList.__call__r$   c                 C   s   dS )r2   z%<Twilio.FlexApi.V1.PluginArchiveList>r!   r(   r!   r!   r"   rA      s    zPluginArchiveList.__repr__)rB   rC   rD   r   r   rF   r#   r   r\   rA   rJ   r!   r!   r   r"   rX      s   	rX   N)rE   r   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr	   Ztwilio.base.instance_resourcer
   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r#   rX   r!   r!   r!   r"   <module>   s   ZS