U
    ^g%i,                     @   s   d Z ddlmZ ddlmZ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 - Insights
    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ListOptionalUnion)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       s   e Zd ZG dd deZG dd deZG dd deZG dd deZee	e
ef e
d	 fd
dZeddddZejfedef d dddZejfedef d dddZe
dddZ  ZS )CallSummaryInstancec                   @   s(   e Zd ZdZdZdZdZdZdZdZ	dS )	zCallSummaryInstance.AnsweredByunknownZmachine_startZmachine_end_beepZmachine_end_silenceZmachine_end_otherZhumanfaxN)
__name__
__module____qualname__UNKNOWNZMACHINE_STARTZMACHINE_END_BEEPZMACHINE_END_SILENCEZMACHINE_END_OTHERZHUMANZFAX r   r   h/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/insights/v1/call/call_summary.py
AnsweredBy   s   r   c                   @   s,   e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
zCallSummaryInstance.CallStateZringing	completedbusyZfailZnoanswercanceledZansweredZundialedN)r   r   r   ZRINGINGZ	COMPLETEDZBUSYZFAILZNOANSWERZCANCELEDZANSWEREDZUNDIALEDr   r   r   r   	CallState#   s   r   c                   @   s    e Zd ZdZdZdZdZdZdS )zCallSummaryInstance.CallTypeZcarriersipZtrunkingclientZwhatsappN)r   r   r   ZCARRIERZSIPZTRUNKINGZCLIENTZWHATSAPPr   r   r   r   CallType-   s
   r   c                   @   s   e Zd ZdZdZdS )#CallSummaryInstance.ProcessingStateZcompletepartialN)r   r   r   ZCOMPLETEPARTIALr   r   r   r   ProcessingState4   s   r"   )versionpayloadcall_sidc                    sR  t  | |d| _|d| _|d| _|d| _|d| _|d| _t	
|d| _t	
|d| _t	
|d	| _t	|d
| _t	|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _d|i| _d | _d S )Naccount_sidr%   	call_type
call_stateanswered_byprocessing_statecreated_time
start_timeend_timedurationconnect_durationfromtocarrier_edgeclient_edgesdk_edgesip_edgetagsurl
attributes
propertiestrust
annotation)super__init__getr&   r%   r'   r(   r)   r*   r   Ziso8601_datetimer+   r,   r-   integerr.   r/   Z_fromr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   	_solution_context)selfr#   r$   r%   	__class__r   r   r=   R   sV     zCallSummaryInstance.__init__CallSummaryContext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: CallSummaryContext for this CallSummaryInstance
        Nr%   r%   )rA   rE   _versionr@   rB   r   r   r   _proxy   s    
zCallSummaryInstance._proxyr   r*   rG   c                 C   s   | j j|dS )
        Fetch the CallSummaryInstance

        :param processing_state: The Processing State of this Call Summary. One of `complete`, `partial` or `all`.

        :returns: The fetched CallSummaryInstance
        r*   )rK   fetchrB   r*   r   r   r   rO      s    zCallSummaryInstance.fetchc                    s   | j j|dI dH S )
        Asynchronous coroutine to fetch the CallSummaryInstance

        :param processing_state: The Processing State of this Call Summary. One of `complete`, `partial` or `all`.

        :returns: The fetched CallSummaryInstance
        rN   N)rK   fetch_asyncrP   r   r   r   rR      s    zCallSummaryInstance.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>   s     z/CallSummaryInstance.__repr__.<locals>.<genexpr>z+<Twilio.Insights.V1.CallSummaryInstance {}>joinr@   itemsrW   rB   contextr   r   r   __repr__   s    zCallSummaryInstance.__repr__)r   r   r   objectr   r   r   r"   r   r   strr   r=   propertyrK   r	   unsetr   rO   rR   rb   __classcell__r   r   rC   r   r      s,   	
0r   c                       sn   e Zd Zeed fddZejfede	f e
dddZejfede	f e
ddd	Zed
ddZ  ZS )rE   r#   r%   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the CallSummaryContext

        :param version: Version that contains the resource
        :param call_sid: The unique SID identifier of the Call.
        r%   z/Voice/{call_sid}/SummaryN)r<   r=   r@   rW   _urirB   r#   r%   rC   r   r   r=      s
     zCallSummaryContext.__init__r   rL   c                 C   sL   t d|i}t i }d|d< | jjd| j||d}t| j|| jd dS )rM   r"   application/jsonAcceptGETmethoduriparamsheadersr%   rH   )r	   ofrI   rO   ri   r   r@   rB   r*   rq   rr   r$   r   r   r   rO      s$     
   zCallSummaryContext.fetchc                    sR   t d|i}t i }d|d< | jjd| j||dI dH }t| j|| jd dS )	rQ   r"   rk   rl   rm   rn   Nr%   rH   )r	   rs   rI   rR   ri   r   r@   rt   r   r   r   rR      s$     
   zCallSummaryContext.fetch_asyncrF   c                 C   s$   d dd | j D }d|S )rS   rT   c                 s   s   | ]\}}d  ||V  qdS rU   rV   rX   r   r   r   r\     s     z.CallSummaryContext.__repr__.<locals>.<genexpr>z*<Twilio.Insights.V1.CallSummaryContext {}>r]   r`   r   r   r   rb     s    zCallSummaryContext.__repr__)r   r   r   r   rd   r=   r	   rf   r   rc   r   rO   rR   rb   rg   r   r   rC   r   rE      s    &"rE   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 )CallSummaryListrh   c                    s   t  | d|i| _dS )z
        Initialize the CallSummaryList

        :param version: Version that contains the resource
        :param call_sid: The unique SID identifier of the Call.

        r%   N)r<   r=   r@   rj   rC   r   r   r=     s     zCallSummaryList.__init__rF   c                 C   s   t | j| jd dS z2
        Constructs a CallSummaryContext

        r%   rH   rE   rI   r@   rJ   r   r   r   r>   -  s    zCallSummaryList.getc                 C   s   t | j| jd dS rv   rw   rJ   r   r   r   __call__4  s    zCallSummaryList.__call__c                 C   s   dS )rS   z$<Twilio.Insights.V1.CallSummaryList>r   rJ   r   r   r   rb   ;  s    zCallSummaryList.__repr__)r   r   r   r   rd   r=   rE   r>   rx   rb   rg   r   r   rC   r   ru     s   ru   N)__doc__r   typingr   r   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   rE   ru   r   r   r   r   <module>   s    &_