
    pi                         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
e      Z G d de
      Z G d de      Zy)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                   h     e Zd ZdZdedeeef   def fdZe	dd       Z
ddZdd	Zdefd
Z x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                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        d|i| _	        d | _
        y )Naccount_sidstatuslast_statusdate_updatedr   )super__init__getr   r   r   r   iso8601_datetimer   	_solution_context)selfr   r   r   	__class__s       v/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/assistants/v1/knowledge/knowledge_status.pyr   z KnowledgeStatusInstance.__init__    sz    !*1++m*D%,[[%:*1++m*D0;0L0LKK'1

 "
 ;?    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: KnowledgeStatusContext for this KnowledgeStatusInstance
        r   r   )r   KnowledgeStatusContext_versionr   r   s    r   _proxyzKnowledgeStatusInstance._proxy/   s9     == 2>>$'DM }}r    c                 6    | j                   j                         S )k
        Fetch the KnowledgeStatusInstance


        :returns: The fetched KnowledgeStatusInstance
        )r'   fetchr&   s    r   r*   zKnowledgeStatusInstance.fetch>   s     {{  ""r    c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the KnowledgeStatusInstance


        :returns: The fetched KnowledgeStatusInstance
        N)r'   fetch_asyncr&   s    r   r-   z#KnowledgeStatusInstance.fetch_asyncG   s!      [[,,....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>z3KnowledgeStatusInstance.__repr__.<locals>.<genexpr>V        SDAq7>>!Q/S   !z1<Twilio.Assistants.V1.KnowledgeStatusInstance {}>joinr   itemsr4   r   contexts     r   __repr__z KnowledgeStatusInstance.__repr__P   s6     ((SDNN<P<P<RSSBII'RRr    )r!   r$   )r!   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr'   r*   r-   rA   __classcell__r   s   @r   r   r      sV    ? ?$sCx. ?c ?  #/S# Sr    r   c                   L     e Zd Zdedef fdZdefdZ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 KnowledgeStatusContext

        :param version: Version that contains the resource
        :param id: the Knowledge ID.
        r   z/Knowledge/{id}/StatusN )r   r   r   r4   _urir   r   r   r   s      r   r   zKnowledgeStatusContext.__init__\   s@     	! "
 4,33EdnnE	r    r!   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r)   application/jsonAcceptGETmethoduriheadersr   r#   )r   ofr%   r*   rM   r   r   r   rV   r   s      r   r*   zKnowledgeStatusContext.fetchk   s]     ))B-.--%%U		7%S&MM~~d#
 	
r    c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r,   rP   rQ   rR   rS   Nr   r#   )r   rW   r%   r-   rM   r   r   rX   s      r   r-   z"KnowledgeStatusContext.fetch_async   sr      ))B-.11dii 2 
 
 'MM~~d#
 	
	
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )r/   r0   c              3   F   K   | ]  \  }}d j                  ||        ywr2   r3   r5   s      r   r9   z2KnowledgeStatusContext.__repr__.<locals>.<genexpr>   r:   r;   z0<Twilio.Assistants.V1.KnowledgeStatusContext {}>r<   r?   s     r   rA   zKnowledgeStatusContext.__repr__   s6     ((SDNN<P<P<RSSAHHQQr    )rB   rC   rD   r   rF   r   r   r*   r-   rA   rH   rI   s   @r   r$   r$   Z   sA    F FS F
. 
(
#: 
,R# Rr    r$   c                   L     e Zd Zdedef fdZdefdZdefdZdefdZ	 xZ
S )KnowledgeStatusListr   r   c                 6    t         |   |       d|i| _        y)z
        Initialize the KnowledgeStatusList

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

        r   N)r   r   r   rN   s      r   r   zKnowledgeStatusList.__init__   s"     	! "
r    r!   c                 J    t        | j                  | j                  d         S z6
        Constructs a KnowledgeStatusContext

        r   r#   r$   r%   r   r&   s    r   r   zKnowledgeStatusList.get       
 &dmmt8LMMr    c                 J    t        | j                  | j                  d         S r`   ra   r&   s    r   __call__zKnowledgeStatusList.__call__   rb   r    c                      y)r/   z*<Twilio.Assistants.V1.KnowledgeStatusList>rL   r&   s    r   rA   zKnowledgeStatusList.__repr__   s     <r    )rB   rC   rD   r   rF   r   r$   r   rd   rA   rH   rI   s   @r   r]   r]      s@    
 
S 
N+ NN0 N<# <r    r]   N)rE   r   typingr   r   r   twilio.baser   r   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r$   r]   rL   r    r   <module>rl      sQ     & & + 8 : 2 '?S. ?SDBR_ BRJ%<, %<r    