
    C%h`                         d Z ddlmZmZ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 ddlmZ  G d	 d
e      Z G d de      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Flex
    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IteratorAsyncIterator)deserializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       Zej                  fded	ed
edeeef   dd f
dZej                  fded	ed
edeeef   dd f
dZdefdZ xZS )AssessmentsInstancea  
    :ivar account_sid: The unique SID identifier of the Account.
    :ivar assessment_sid: The SID of the assessment
    :ivar offset: Offset of the conversation
    :ivar report: The flag indicating if this assessment is part of report
    :ivar weight: The weightage given to this comment
    :ivar agent_id: The id of the Agent
    :ivar segment_id: Segment Id of conversation
    :ivar user_name: The name of the user.
    :ivar user_email: The email id of the user.
    :ivar answer_text: The answer text selected by user
    :ivar answer_id: The id of the answer selected by user
    :ivar assessment: Assessment Details associated with an assessment
    :ivar timestamp:
    :ivar url:
    versionpayloadassessment_sidc                 :   t         |   |       |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        t        j                  |j                  d            | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )Naccount_sidr   offsetreportweightagent_id
segment_id	user_name
user_emailanswer_text	answer_id
assessment	timestampurl)super__init__getr   r   r
   decimalr   r   r   r   r   r   r   r   r    r!   r"   r#   	_solution_context)selfr   r   r   	__class__s       i/var/www/html/Kila-kolis-project/venv/lib/python3.12/site-packages/twilio/rest/flex_api/v1/assessments.pyr%   zAssessmentsInstance.__init__*   s;    	!*1++m*D-4[[9I-J'2':':7;;x;P'Q&-kk(&;'2':':7;;x;P'Q'.{{:'>)0\)B(/K(@)0\)B*1++m*D(/K(@7>{{<7P*5*=*=gkk+>V*W")++e"4 nC0C0C
 7;    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: AssessmentsContext for this AssessmentsInstance
        r   r   )r)   AssessmentsContext_versionr(   r*   s    r,   _proxyzAssessmentsInstance._proxyF   s:     == .#~~.>?DM }}r-   r   r   r    authorizationc                 @    | j                   j                  ||||      S )[  
        Update the AssessmentsInstance

        :param offset: The offset of the conversation
        :param answer_text: The answer text selected by user
        :param answer_id: The id of the answer selected by user
        :param authorization: The Authorization HTTP request header

        :returns: The updated AssessmentsInstance
        r   r   r    r5   )r4   updater*   r   r   r    r5   s        r,   r9   zAssessmentsInstance.updateU   s,    " {{!!#'	 " 
 	
r-   c                 \   K   | j                   j                  ||||       d{   S 7 w)u  
        Asynchronous coroutine to update the AssessmentsInstance

        :param offset: The offset of the conversation
        :param answer_text: The answer text selected by user
        :param answer_id: The id of the answer selected by user
        :param authorization: The Authorization HTTP request header

        :returns: The updated AssessmentsInstance
        r8   N)r4   update_asyncr:   s        r,   r=   z AssessmentsInstance.update_asyncm   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>z/AssessmentsInstance.__repr__.<locals>.<genexpr>   "     S<RDAq7>>!Q/<R   !z*<Twilio.FlexApi.V1.AssessmentsInstance {}>joinr(   itemsrD   r*   contexts     r,   __repr__zAssessmentsInstance.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr-   )N)r.   r1   )__name__
__module____qualname____doc__r   r   strr   r   r%   propertyr4   r   unsetfloatr   objectr9   r=   rQ   __classcell__r+   s   @r,   r   r      s    * )-	;; c3h; !	;8  & -3LL

 
 	

 S&[)
 

: -3LL

 
 	

 S&[)
 

0L# Lr-   r   c                        e Zd Zdedef fdZej                  fdededede	ee
f   def
d	Zej                  fdededede	ee
f   def
d
ZdefdZ xZS )r1   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the AssessmentsContext

        :param version: Version that contains the resource
        :param assessment_sid: The SID of the assessment to be modified
        r   z8/Insights/QualityManagement/Assessments/{assessment_sid}N )r$   r%   r(   rD   _uri)r*   r   r   r+   s      r,   r%   zAssessmentsContext.__init__   sF     	! n
 VNUU 
nn
	r-   r   r   r    r5   r.   c                 `   t        j                  |||d      }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   d|d<   | j
                  j                  d| j                  ||      }t        | j
                  || j                  d	   
      S )r7   Offset
AnswerTextAnswerIdAuthorization!application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethoduridataheadersr   r0   )
r   ofrX   
isinstancerV   r2   r9   r`   r   r(   r*   r   r   r    r5   ro   rp   r   s           r,   r9   zAssessmentsContext.update   s    $ yy )%
 ))B- V\\)=#.}'4GO$"E.--&&tyytW ' 
 #MM74>>BR3S
 	
r-   c                 |  K   t        j                  |||d      }t        j                  i       }|t         j                  u st        |t              r|r||d<   d|d<   d|d<   | j
                  j                  d| j                  ||       d	{   }t        | j
                  || j                  d
         S 7 )w)r<   rb   rf   rg   rh   ri   rj   rk   rl   Nr   r0   )
r   rq   rX   rr   rV   r2   r=   r`   r   r(   rs   s           r,   r=   zAssessmentsContext.update_async   s     $ yy )%
 ))B- V\\)=#.}'4GO$"E.22tyytW 3 
 
 #MM74>>BR3S
 	
	
s   BB<B:*B<c                     dj                  d | j                  j                         D              }dj                  |      S )r?   r@   c              3   F   K   | ]  \  }}d j                  ||        ywrB   rC   rE   s      r,   rI   z.AssessmentsContext.__repr__.<locals>.<genexpr>  rJ   rK   z)<Twilio.FlexApi.V1.AssessmentsContext {}>rL   rO   s     r,   rQ   zAssessmentsContext.__repr__   s6     ((SDNN<P<P<RSS:AA'JJr-   )rR   rS   rT   r   rV   r%   r   rX   rY   r   rZ   r   r9   r=   rQ   r[   r\   s   @r,   r1   r1      s    
 
 
, -3LL+
+
 +
 	+

 S&[)+
 
+
d -3LL+
+
 +
 	+

 S&[)+
 
+
ZK# Kr-   r1   c                   2    e Zd Zdeeef   defdZdefdZy)AssessmentsPager   r.   c                 .    t        | j                  |      S )zq
        Build an instance of AssessmentsInstance

        :param payload: Payload response from the API
        )r   r2   )r*   r   s     r,   get_instancezAssessmentsPage.get_instance  s     #4=='::r-   c                      y)r?   z#<Twilio.FlexApi.V1.AssessmentsPage>r_   r3   s    r,   rQ   zAssessmentsPage.__repr__       5r-   N)	rR   rS   rT   r   rV   r   r   rz   rQ   r_   r-   r,   rx   rx     s*    ;DcN ;7J ;5# 5r-   rx   c                   x    e Zd Zdef fdZej                  fdedededededed	ed
ededede	ee
f   defdZej                  fdedededededed	ed
ededede	ee
f   defdZej                  ej                  ddfde	ee
f   de	ee
f   dee   dee   dee   f
dZej                  ej                  ddfde	ee
f   de	ee
f   dee   dee   dee   f
dZej                  ej                  ddfde	ee
f   de	ee
f   dee   dee   dee   f
dZej                  ej                  ddfde	ee
f   de	ee
f   dee   dee   dee   f
dZej                  ej                  ej                  ej                  ej                  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                  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defdZdedefdZdedefd Zdedefd!Zdefd"Z xZ S )#AssessmentsListr   c                 2    t         |   |       d| _        y)zm
        Initialize the AssessmentsList

        :param version: Version that contains the resource

        z'/Insights/QualityManagement/AssessmentsN)r$   r%   r`   )r*   r   r+   s     r,   r%   zAssessmentsList.__init__  s     	!=	r-   category_sidcategory_namer   r   r   	metric_idmetric_namer   r    questionnaire_sidr5   r.   c                    t        j                  |||||||||	|
d
      }t        j                  |dd      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )	a  
        Create the AssessmentsInstance

        :param category_sid: The SID of the category
        :param category_name: The name of the category
        :param segment_id: Segment Id of the conversation
        :param agent_id: The id of the Agent
        :param offset: The offset of the conversation.
        :param metric_id: The question SID selected for assessment
        :param metric_name: The question name of the assessment
        :param answer_text: The answer text selected by user
        :param answer_id: The id of the answer selected by user
        :param questionnaire_sid: Questionnaire SID of the associated question
        :param authorization: The Authorization HTTP request header

        :returns: The created AssessmentsInstance
        
CategorySidCategoryName	SegmentIdAgentIdrc   MetricId
MetricNamerd   re   QuestionnaireSidrg   rf   rh   rh   ri   rj   rk   rl   )r   rq   r2   creater`   r   r*   r   r   r   r   r   r   r   r   r    r   r5   ro   rp   r   s                  r,   r   zAssessmentsList.create&  s    @ yy+ -'# %))%$5
 ))!. C
 #F.--&&tyytW ' 
 #4=='::r-   c                    K   t        j                  |||||||||	|
d
      }t        j                  |dd      }d|d<   d|d<   | j                  j                  d| j                  ||       d	{   }t        | j                  |      S 7 w)
a  
        Asynchronously create the AssessmentsInstance

        :param category_sid: The SID of the category
        :param category_name: The name of the category
        :param segment_id: Segment Id of the conversation
        :param agent_id: The id of the Agent
        :param offset: The offset of the conversation.
        :param metric_id: The question SID selected for assessment
        :param metric_name: The question name of the assessment
        :param answer_text: The answer text selected by user
        :param answer_id: The id of the answer selected by user
        :param questionnaire_sid: Questionnaire SID of the associated question
        :param authorization: The Authorization HTTP request header

        :returns: The created AssessmentsInstance
        r   rg   r   rh   ri   rj   rk   rl   N)r   rq   r2   create_asyncr`   r   r   s                  r,   r   zAssessmentsList.create_asynce  s     @ yy+ -'# %))%$5
 ))!. C
 #F.22tyytW 3 
 
 #4=='::	
s   A/B1B2BNlimit	page_sizec                     | j                   j                  ||      }| j                  |||d         }| j                   j                  ||d         S )a  
        Streams AssessmentsInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param str authorization: The Authorization HTTP request header
        :param str segment_id: The id of the segment.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r5   r   r   r   )r2   read_limitspagestreamr*   r5   r   r   r   limitsr   s          r,   r   zAssessmentsList.stream  sX    0 **5)<yy'![)  
 }}##D&/::r-   c                    K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  ||d         S 7 #w)a  
        Asynchronously streams AssessmentsInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param str authorization: The Authorization HTTP request header
        :param str segment_id: The id of the segment.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   Nr   )r2   r   
page_asyncstream_asyncr   s          r,   r   zAssessmentsList.stream_async  sf     0 **5)<__'![) % 
 
 }}))$w@@
s   7AA$Ac                 >    t        | j                  ||||            S )a|  
        Lists AssessmentsInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str authorization: The Authorization HTTP request header
        :param str segment_id: The id of the segment.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r5   r   r   r   )listr   )r*   r5   r   r   r   s        r,   r   zAssessmentsList.list  s.    . KK+%#	  
 	
r-   c                 ~   K   | j                  ||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a  
        Asynchronously lists AssessmentsInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str authorization: The Authorization HTTP request header
        :param str segment_id: The id of the segment.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r   N)r   )r*   r5   r   r   r   records         r,   
list_asynczAssessmentsList.list_async  s_     2 '+&7&7+%#	 '8 ' ! !
 
 !
 
 	
 
s0   =0=842
48=48=
page_tokenpage_numberc                     t        j                  |||||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Retrieve a single page of AssessmentsInstance records from the API.
        Request is executed immediately

        :param authorization: The Authorization HTTP request header
        :param segment_id: The id of the segment.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of AssessmentsInstance
        rf   r   	PageTokenr   PageSizerg   r   ri   rj   GETrm   rn   paramsrp   )r   rq   r2   r   r`   rx   	r*   r5   r   r   r   r   ro   rp   responses	            r,   r   zAssessmentsList.page'  s    ( yy!.''#%
 ))!. C
 /==%%diig & 
 t}}h77r-   c                   K   t        j                  |||||d      }t        j                  |dd      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a   
        Asynchronously retrieve a single page of AssessmentsInstance records from the API.
        Request is executed immediately

        :param authorization: The Authorization HTTP request header
        :param segment_id: The id of the segment.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of AssessmentsInstance
        r   rg   r   ri   rj   r   r   N)r   rq   r2   r   r`   rx   r   s	            r,   r   zAssessmentsList.page_asyncS  s     ( yy!.''#%
 ))!. C
 /11diig 2 
 
 t}}h77
s   A%B'B(B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of AssessmentsInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of AssessmentsInstance
        r   )r2   domaintwiliorequestrx   r*   r   r   s      r,   get_pagezAssessmentsList.get_page  s7     ==''..66ujIt}}h77r-   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a
  
        Asynchronously retrieve a specific page of AssessmentsInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of AssessmentsInstance
        r   N)r2   r   r   request_asyncrx   r   s      r,   get_page_asynczAssessmentsList.get_page_async  sD      --44BB5*UUt}}h77 Vs   4AAAr   c                 0    t        | j                  |      S zz
        Constructs a AssessmentsContext

        :param assessment_sid: The SID of the assessment to be modified
        r0   r1   r2   r*   r   s     r,   r&   zAssessmentsList.get       "$--OOr-   c                 0    t        | j                  |      S r   r   r   s     r,   __call__zAssessmentsList.__call__  r   r-   c                      y)r?   z#<Twilio.FlexApi.V1.AssessmentsList>r_   r3   s    r,   rQ   zAssessmentsList.__repr__  r|   r-   )!rR   rS   rT   r   r%   r   rX   rV   rY   r   rZ   r   r   r   r   intr   r   r	   r   r   r   r   rx   r   r   r   r   r1   r&   r   rQ   r[   r\   s   @r,   r~   r~     se   	> 	>. -3LL=;=; =; 	=;
 =; =; =; =; =; =; =; S&[)=; 
=;V -3LL=;=; =; 	=;
 =; =; =; =; =; =; =; S&[)=; 
=;B -3LL)/##';S&[); #v+&; }	;
 C=; 
%	&;F -3LL)/##'AS&[)A #v+&A }	A
 C=A 
*	+AF -3LL)/##'
S&[)
 #v+&
 }	

 C=
 
!	"
D -3LL)/##'
S&[)
 #v+&
 }	

 C=
 
!	"
F -3LL)/)/*0,,(.*8S&[)*8 #v+&*8 #v+&	*8
 3;'*8 f%*8 
*8\ -3LL)/)/*0,,(.*8S&[)*8 #v+&*8 #v+&	*8
 3;'*8 f%*8 
*8X
83 
8? 
8
8s 
8 
8P# P*< PPs P/A P5# 5r-   r~   N)rU   typingr   r   r   r   r   r   r	   twilio.baser
   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r1   rx   r~   r_   r-   r,   <module>r      se    M L L + 8 : 2 ' !tL* tLntK tKn5d 5&T5l T5r-   