
    piF                         d Z ddlmZmZmZmZmZ ddlmZ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 - 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.
    )AnyDictListOptionalUnion)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       e Zd Z G d de      Z G d de      Z	 dedeee	f   def fdZ
edd
       ZddZddZej                   ej                   ej                   ej                   ej                   ej                   ej                   fdedef   dedef   deeef   deeef   deeef   deeef   deeef   d	d fdZej                   ej                   ej                   ej                   ej                   ej                   ej                   fdedef   dedef   deeef   deeef   deeef   deeef   deeef   d	d fdZd	efdZ xZS )AnnotationInstancec                       e Zd ZdZdZdZy)AnnotationInstance.AnsweredByunknown_answered_byhumanmachineN)__name__
__module____qualname__UNKNOWN_ANSWERED_BYHUMANMACHINE     i/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/insights/v1/call/annotation.py
AnsweredByr      s    3r   r   c                   $    e Zd ZdZdZdZdZdZdZy)$AnnotationInstance.ConnectivityIssueunknown_connectivity_issueno_connectivity_issueinvalid_number	caller_iddropped_callnumber_reachabilityN)	r   r   r   UNKNOWN_CONNECTIVITY_ISSUENO_CONNECTIVITY_ISSUEINVALID_NUMBER	CALLER_IDDROPPED_CALLNUMBER_REACHABILITYr   r   r   ConnectivityIssuer!      s#    %A" 7)	%3r   r.   versionpayloadcall_sidc                 "   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        d|i| _        d | _        y )Nr1   account_sidanswered_byconnectivity_issuequality_issuesspam
call_scorecommentincidenturl)super__init__getr1   r3   r4   r5   r6   r7   r   integerr8   r9   r:   r;   	_solution_context)selfr/   r0   r1   	__class__s       r   r=   zAnnotationInstance.__init__3   s    !'.{{:'>*1++m*DFMkkG
 KK,- 	 4;;;?O3P$+KK$7	)4)<)<W[[=V)W&-kk)&<'.{{:'>")++e"4 
 6:r   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: AnnotationContext for this AnnotationInstance
        r1   r1   )rA   AnnotationContext_versionr@   rB   s    r   _proxyzAnnotationInstance._proxyJ   s9     == -
3DM }}r   c                 6    | j                   j                         S )a
        Fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        )rJ   fetchrI   s    r   rM   zAnnotationInstance.fetchY   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w){
        Asynchronous coroutine to fetch the AnnotationInstance


        :returns: The fetched AnnotationInstance
        N)rJ   fetch_asyncrI   s    r   rP   zAnnotationInstance.fetch_asyncb   s!      [[,,....s   '%'r4   r   r5   r!   r6   r7   r8   r9   r:   c           	      F    | j                   j                  |||||||      S )  
        Update the AnnotationInstance

        :param answered_by:
        :param connectivity_issue:
        :param quality_issues: Specify if the call had any subjective quality issues. Possible values, one or more of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`. Use comma separated values to indicate multiple quality issues for the same call.
        :param spam: A boolean flag to indicate if the call was a spam call. Use this to provide feedback on whether calls placed from your account were marked as spam, or if inbound calls received by your account were unwanted spam. Use `true` if the call was a spam call.
        :param call_score: Specify the call score. This is of type integer. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :param comment: Specify any comments pertaining to the call. `comment` has a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in the `comment`.
        :param incident: Associate this call with an incident or support ticket. The `incident` parameter is of type string with a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in `incident`.

        :returns: The updated AnnotationInstance
        r4   r5   r6   r7   r8   r9   r:   )rJ   updaterB   r4   r5   r6   r7   r8   r9   r:   s           r   rT   zAnnotationInstance.updatek   s5    2 {{!!#1)! " 
 	
r   c           	      b   K   | j                   j                  |||||||       d{   S 7 w)  
        Asynchronous coroutine to update the AnnotationInstance

        :param answered_by:
        :param connectivity_issue:
        :param quality_issues: Specify if the call had any subjective quality issues. Possible values, one or more of `no_quality_issue`, `low_volume`, `choppy_robotic`, `echo`, `dtmf`, `latency`, `owa`, `static_noise`. Use comma separated values to indicate multiple quality issues for the same call.
        :param spam: A boolean flag to indicate if the call was a spam call. Use this to provide feedback on whether calls placed from your account were marked as spam, or if inbound calls received by your account were unwanted spam. Use `true` if the call was a spam call.
        :param call_score: Specify the call score. This is of type integer. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].
        :param comment: Specify any comments pertaining to the call. `comment` has a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in the `comment`.
        :param incident: Associate this call with an incident or support ticket. The `incident` parameter is of type string with a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in `incident`.

        :returns: The updated AnnotationInstance
        rS   N)rJ   update_asyncrU   s           r   rX   zAnnotationInstance.update_async   sC     2 [[--#1)! . 
 
 	
 
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>z.AnnotationInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z*<Twilio.Insights.V1.AnnotationInstance {}>joinr@   itemsr_   rB   contexts     r   __repr__zAnnotationInstance.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr   )rD   rG   )rD   r   )r   r   r   objectr   r.   r   r   strr   r=   propertyrJ   rM   rP   r
   unsetr   boolintrT   rX   rl   __classcell__rC   s   @r   r   r      s   V 
4F 4: :$sCx. :C :.  #/ GMll LL-3\\$*LL)/&,ll'-||!
:FBC!
 "2F:
!
 c6k*!
 D&L!!
 #v+&!
 sF{#!
 V$!
 
!
J GMll LL-3\\$*LL)/&,ll'-||!
:FBC!
 "2F:
!
 c6k*!
 D&L!!
 #v+&!
 sF{#!
 V$!
 
!
FL# Lr   r   c                   `    e Zd Zdedef fdZdefdZdefdZe	j                  e	j                  e	j                  e	j                  e	j                  e	j                  e	j                  fdedef   d	ed
ef   deeef   deeef   deeef   deeef   deeef   defdZe	j                  e	j                  e	j                  e	j                  e	j                  e	j                  e	j                  fdedef   d	ed
ef   deeef   deeef   deeef   deeef   deeef   defdZdefdZ xZS )rG   r/   r1   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the AnnotationContext

        :param version: Version that contains the resource
        :param call_sid: The unique string that Twilio created to identify this Call resource. It always starts with a CA.
        r1   z/Voice/{call_sid}/AnnotationNr   )r<   r=   r@   r_   _urirB   r/   r1   rC   s      r   r=   zAnnotationContext.__init__   s@     	! 
 :299KDNNK	r   rD   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )rL   application/jsonAcceptGETmethoduriheadersr1   rF   )r
   ofrH   rM   rw   r   r@   rB   r   r0   s      r   rM   zAnnotationContext.fetch   s]     ))B-.--%%U		7%S!MM^^J/
 	
r   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)rO   rz   r{   r|   r}   Nr1   rF   )r
   r   rH   rP   rw   r   r@   r   s      r   rP   zAnnotationContext.fetch_async   sr      ))B-.11dii 2 
 
 "MM^^J/
 	
	
s   AA4A2	*A4r4   r   r5   r!   r6   r7   r8   r9   r:   c           
      <   t        j                  |||t        j                  |      |||d      }t        j                  i       }	d|	d<   d|	d<   | j                  j                  d| j                  ||	      }
t        | j                  |
| j                  d   	      S )
rR   r   r.   QualityIssuesSpam	CallScoreCommentIncident!application/x-www-form-urlencodedContent-Typerz   r{   POSTr~   r   datar   r1   rF   )	r
   r   r	   boolean_to_stringrH   rT   rw   r   r@   rB   r4   r5   r6   r7   r8   r9   r:   r   r   r0   s              r   rT   zAnnotationContext.update   s    4 yy)%7!/!33D9'"$

 ))B-"E.--&&tyytW ' 
 "MM7T^^J-G
 	
r   c           
      X  K   t        j                  |||t        j                  |      |||d      }t        j                  i       }	d|	d<   d|	d<   | j                  j                  d| j                  ||	       d{   }
t        | j                  |
| j                  d	   
      S 7 )w)rW   r   r   r   rz   r{   r   r   Nr1   rF   )	r
   r   r	   r   rH   rX   rw   r   r@   r   s              r   rX   zAnnotationContext.update_async)  s     4 yy)%7!/!33D9'"$

 ))B-"E.22tyytW 3 
 
 "MM7T^^J-G
 	
	
s   A<B*>B(?*B*c                     dj                  d | j                  j                         D              }dj                  |      S )rZ   r[   c              3   F   K   | ]  \  }}d j                  ||        ywr]   r^   r`   s      r   rd   z-AnnotationContext.__repr__.<locals>.<genexpr>b  re   rf   z)<Twilio.Insights.V1.AnnotationContext {}>rg   rj   s     r   rl   zAnnotationContext.__repr__\  s6     ((SDNN<P<P<RSS:AA'JJr   )r   r   r   r   rn   r=   r   rM   rP   r
   rp   r   rm   rq   rr   rT   rX   rl   rs   rt   s   @r   rG   rG      s   L L3 L
) 
(
#5 
0 GMll LL-3\\$*LL)/&,ll'-||1
:FBC1
 "2F:
1
 c6k*1
 D&L!1
 #v+&1
 sF{#1
 V$1
 
1
j GMll LL-3\\$*LL)/&,ll'-||1
:FBC1
 "2F:
1
 c6k*1
 D&L!1
 #v+&1
 sF{#1
 V$1
 
1
fK# Kr   rG   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 )AnnotationListr/   r1   c                 6    t         |   |       d|i| _        y)z
        Initialize the AnnotationList

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

        r1   N)r<   r=   r@   rx   s      r   r=   zAnnotationList.__init__h  s"     	! 
r   rD   c                 J    t        | j                  | j                  d         S z1
        Constructs a AnnotationContext

        r1   rF   rG   rH   r@   rI   s    r   r>   zAnnotationList.getw      
 !
9STTr   c                 J    t        | j                  | j                  d         S r   r   rI   s    r   __call__zAnnotationList.__call__~  r   r   c                      y)rZ   z#<Twilio.Insights.V1.AnnotationList>r   rI   s    r   rl   zAnnotationList.__repr__  s     5r   )r   r   r   r   rn   r=   rG   r>   r   rl   rs   rt   s   @r   r   r   f  s@    
 
3 
U& UU+ U5# 5r   r   N)__doc__typingr   r   r   r   r   twilio.baser   r	   r
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   rG   r   r   r   r   <module>r      sS    4 3 6 6 8 : 2 'aL) aLHhK hKV%5\ %5r   