o
    f>h                     @   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                       sf   e Zd ZdZdedeeef def fddZe	dd	d
Z
dddZdddZdef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   iso8601_datetimer   	_solution_context)selfr   r   r   	__class__ g/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/assistants/v1/knowledge/knowledge_status.pyr       s   
z KnowledgeStatusInstance.__init__returnKnowledgeStatusContextc                 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: 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   $   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>V       z3KnowledgeStatusInstance.__repr__.<locals>.<genexpr>z1<Twilio.Assistants.V1.KnowledgeStatusInstance {}>joinr   itemsr/   r   contextr   r   r   __repr__P      
z KnowledgeStatusInstance.__repr__)r   r    )r   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr$   r&   r(   r;   __classcell__r   r   r   r   r      s    "

		r   c                       P   e Zd Zdedef fddZdefddZ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 KnowledgeStatusContext

        :param version: Version that contains the resource
        :param id: the Knowledge ID.
        r   z/Knowledge/{id}/StatusNr   )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&   rE   r   r   r   rM   r   r   r   r   r&   k   s   
zKnowledgeStatusContext.fetchc                    sD   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r'   rG   rH   rI   rJ   Nr   r!   )r   rN   r"   r(   rE   r   r   rO   r   r   r   r(      s   
z"KnowledgeStatusContext.fetch_asyncc                 C   r)   )r*   r+   c                 s   r,   r-   r.   r0   r   r   r   r4      r5   z2KnowledgeStatusContext.__repr__.<locals>.<genexpr>z0<Twilio.Assistants.V1.KnowledgeStatusContext {}>r6   r9   r   r   r   r;      r<   zKnowledgeStatusContext.__repr__)r=   r>   r?   r   rA   r   r   r&   r(   r;   rC   r   r   r   r   r    Z   s
    r    c                       rD   )KnowledgeStatusListr   r   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   rF   r   r   r   r      s   
zKnowledgeStatusList.__init__r   c                 C      t | j| jd dS z6
        Constructs a KnowledgeStatusContext

        r   r!   r    r"   r   r#   r   r   r   r         zKnowledgeStatusList.getc                 C   rQ   rR   rS   r#   r   r   r   __call__   rT   zKnowledgeStatusList.__call__c                 C   s   dS )r*   z*<Twilio.Assistants.V1.KnowledgeStatusList>r   r#   r   r   r   r;      s   zKnowledgeStatusList.__repr__)r=   r>   r?   r   rA   r   r    r   rU   r;   rC   r   r   r   r   rP      s
    rP   N)r@   r   typingr   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r    rP   r   r   r   r   <module>   s    BE