U
    ^g%i                     @   s   d Z ddlmZ ddl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 - Assistants
    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)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       sn   e Zd ZdZeeeef ed fddZe	ddddZ
d dd	d
Zd dddZedddZ  ZS )KnowledgeStatusInstancea  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
    :ivar status: The status of processing the knowledge source ('QUEUED', 'PROCESSING', 'COMPLETED', 'FAILED')
    :ivar last_status: The last status of processing the knowledge source ('QUEUED', 'PROCESSING', 'COMPLETED', 'FAILED')
    :ivar date_updated: The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    )versionpayloadidc                    sV   t  | |d| _|d| _|d| _t|d| _d|i| _	d | _
d S )Naccount_sidstatuslast_statusdate_updatedr   )super__init__getr   r   r   r   Ziso8601_datetimer   	_solution_context)selfr   r   r   	__class__ s/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/assistants/v1/knowledge/knowledge_status.pyr       s     z KnowledgeStatusInstance.__init__KnowledgeStatusContext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: KnowledgeStatusContext for this KnowledgeStatusInstance
        Nr   r   )r   r   _versionr   r   r   r   r   _proxy/   s    
zKnowledgeStatusInstance._proxyc                 C   s
   | j  S )k
        Fetch the KnowledgeStatusInstance


        :returns: The fetched KnowledgeStatusInstance
        )r$   fetchr#   r   r   r   r&   >   s    zKnowledgeStatusInstance.fetchc                    s   | j  I dH S )
        Asynchronous coroutine to fetch the KnowledgeStatusInstance


        :returns: The fetched KnowledgeStatusInstance
        N)r$   fetch_asyncr#   r   r   r   r(   G   s    z#KnowledgeStatusInstance.fetch_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>V   s     z3KnowledgeStatusInstance.__repr__.<locals>.<genexpr>z1<Twilio.Assistants.V1.KnowledgeStatusInstance {}>joinr   itemsr-   r   contextr   r   r   __repr__P   s    z KnowledgeStatusInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   propertyr$   r&   r(   r8   __classcell__r   r   r   r   r      s   		r   c                       sN   e Zd Zeed fddZedddZ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 KnowledgeStatusContext

        :param version: Version that contains the resource
        :param id: the Knowledge ID.
        r   z/Knowledge/{id}/StatusN)r   r   r   r-   _urir   r   r   r   r   r   r   \   s
     zKnowledgeStatusContext.__init__r   c                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r%   application/jsonAcceptGETmethoduriheadersr   r!   )r   ofr"   r&   rA   r   r   r   rI   r   r   r   r   r&   k   s    
zKnowledgeStatusContext.fetchc                    sB   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r'   rC   rD   rE   rF   Nr   r!   )r   rJ   r"   r(   rA   r   r   rK   r   r   r   r(      s    
  z"KnowledgeStatusContext.fetch_asyncc                 C   s$   d dd | j D }d|S )r)   r*   c                 s   s   | ]\}}d  ||V  qdS r+   r,   r.   r   r   r   r2      s     z2KnowledgeStatusContext.__repr__.<locals>.<genexpr>z0<Twilio.Assistants.V1.KnowledgeStatusContext {}>r3   r6   r   r   r   r8      s    zKnowledgeStatusContext.__repr__)r9   r:   r;   r   r=   r   r   r&   r(   r8   r?   r   r   r   r   r   Z   s   r   c                       sN   e Zd Zeed fddZedddZedddZedd	d
Z	  Z
S )KnowledgeStatusListr@   c                    s   t  | d|i| _dS )z
        Initialize the KnowledgeStatusList

        :param version: Version that contains the resource
        :param id: the Knowledge ID.

        r   N)r   r   r   rB   r   r   r   r      s     zKnowledgeStatusList.__init__r   c                 C   s   t | j| jd dS z6
        Constructs a KnowledgeStatusContext

        r   r!   r   r"   r   r#   r   r   r   r      s    zKnowledgeStatusList.getc                 C   s   t | j| jd dS rM   rN   r#   r   r   r   __call__   s    zKnowledgeStatusList.__call__c                 C   s   dS )r)   z*<Twilio.Assistants.V1.KnowledgeStatusList>r   r#   r   r   r   r8      s    zKnowledgeStatusList.__repr__)r9   r:   r;   r   r=   r   r   r   rO   r8   r?   r   r   r   r   rL      s   rL   N)r<   r   typingr   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   rL   r   r   r   r   <module>   s   BE