
    g`                         S r SSKJrJrJrJrJrJrJr  SSK	J
r
Jr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr   " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      rg)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                      ^  \ rS rSrSr SS\S\\\4   S\	\   4U 4S jjjr
\SS j5       r\R                  4S	\S
\S\S\\\4   SS 4
S jjr\R                  4S	\S
\S\S\\\4   SS 4
S jjrS\4S jrSrU =r$ )AssessmentsInstance   a~  
: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                 J  > [         TU ]  U5        UR                  S5      U l        UR                  S5      U l        [
        R                  " UR                  S5      5      U l        UR                  S5      U l        [
        R                  " UR                  S5      5      U l	        UR                  S5      U l
        UR                  S5      U l        UR                  S5      U l        UR                  S	5      U l        UR                  S
5      U l        UR                  S5      U l        UR                  S5      U l        [
        R                  " UR                  S5      5      U l        UR                  S5      U l        SU=(       d    U R                  0U l        S U l        g )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       k/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/twilio/rest/flex_api/v1/assessments.pyr&   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                     U R                   c&  [        U R                  U R                  S   S9U l         U R                   $ )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-   _proxyAssessmentsInstance._proxyF   s:     == .#~~.>?DM }}r/   r   r    r!   authorizationc                 :    U R                   R                  UUUUS9$ )#  
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!   r8   )r6   updater+   r   r    r!   r8   s        r-   r<   AssessmentsInstance.updateU   s,    " {{!!#'	 " 
 	
r/   c                 V   #    U R                   R                  UUUUS9I Sh  vN $  N7f)=  
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
r;   N)r6   update_asyncr=   s        r-   rA    AssessmentsInstance.update_asyncm   s9     " [[--#'	 . 
 
 	
 
s    )')c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )N
Provide a friendly representation

:returns: Machine friendly representation
 c              3   H   #    U  H  u  pS R                  X5      v   M     g7fz{}={}Nformat.0kvs      r-   	<genexpr>/AssessmentsInstance.__repr__.<locals>.<genexpr>         S<RDA7>>!//<R    "z*<Twilio.FlexApi.V1.AssessmentsInstance {}>joinr)   itemsrI   r+   contexts     r-   __repr__AssessmentsInstance.__repr__   s6     ((SDNN<P<P<RSS;BB7KKr/   )r*   r)   r   r   r!   r    r"   r   r   r   r   r#   r$   r   r   r   )N)r0   r3   )__name__
__module____qualname____firstlineno____doc__r   r   strr   r   r&   propertyr6   r   unsetfloatr   objectr<   rA   rW   __static_attributes____classcell__r,   s   @r-   r   r      s    * )-	;; c3h; !	; ;8  & -3LL

 
 	

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

 S&[)
 

0L# L Lr/   r   c                      ^  \ rS rSrS\S\4U 4S jjr\R                  4S\	S\S\S\
\\4   S	\4
S
 jjr\R                  4S\	S\S\S\
\\4   S	\4
S jjrS	\4S jrSrU =r$ )r3      r   r   c                 x   > [         TU ]  U5        SU0U l        SR                  " S0 U R                  D6U l        g)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)   rI   _uri)r+   r   r   r,   s      r-   r&   AssessmentsContext.__init__   sC     	! n
 OUU 
nn
	r/   r   r    r!   r8   r0   c                 h   [         R                  " UUUS.5      n[         R                  " 0 5      nU[         R                  L d   [        U[        5      (       a  U(       a  XFS'   SUS'   SUS'   U R
                  R                  SU R                  XVS9n[        U R
                  XpR                  S	   S
9$ )r:   Offset
AnswerTextAnswerIdAuthorization!application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethoduridataheadersr   r2   )
r   ofr`   
isinstancer^   r4   r<   rj   r   r)   r+   r   r    r!   r8   rz   r{   r   s           r-   r<   AssessmentsContext.update   s    $ yy )%
 ))B- V\\)=#..}'4O$"E.--&&tyyt ' 
 #MM7>>BR3S
 	
r/   c                   #    [         R                  " UUUS.5      n[         R                  " 0 5      nU[         R                  L d   [        U[        5      (       a  U(       a  XFS'   SUS'   SUS'   U R
                  R                  SU R                  XVS9I S	h  vN n[        U R
                  XpR                  S
   S9$  N%7f)r@   rm   rq   rr   rs   rt   ru   rv   rw   Nr   r2   )
r   r|   r`   r}   r^   r4   rA   rj   r   r)   r~   s           r-   rA   AssessmentsContext.update_async   s     $ yy )%
 ))B- V\\)=#..}'4O$"E.22tyyt 3 
 
 #MM7>>BR3S
 	
	
s   BC B>&C c                     SR                  S U R                  R                  5        5       5      nSR                  U5      $ )rD   rE   c              3   H   #    U  H  u  pS R                  X5      v   M     g7frG   rH   rJ   s      r-   rN   .AssessmentsContext.__repr__.<locals>.<genexpr>  rP   rQ   z)<Twilio.FlexApi.V1.AssessmentsContext {}>rR   rU   s     r-   rW   AssessmentsContext.__repr__   s6     ((SDNN<P<P<RSS:AA'JJr/   )r)   rj   )rY   rZ   r[   r\   r   r^   r&   r   r`   ra   r   rb   r   r<   rA   rW   rc   rd   re   s   @r-   r3   r3      s    
 
 
, -3LL+
+
 +
 	+

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

 S&[)+
 
+
ZK# K Kr/   r3   c                   >    \ rS rSrS\\\4   S\4S jrS\4S jr	Sr
g)AssessmentsPagei  r   r0   c                 .    [        U R                  U5      $ )zY
Build an instance of AssessmentsInstance

:param payload: Payload response from the API
)r   r4   )r+   r   s     r-   get_instanceAssessmentsPage.get_instance  s     #4=='::r/   c                     g)rD   z#<Twilio.FlexApi.V1.AssessmentsPage>ri   r5   s    r-   rW   AssessmentsPage.__repr__       5r/   ri   N)rY   rZ   r[   r\   r   r^   r   r   r   rW   rc   ri   r/   r-   r   r     s*    ;DcN ;7J ;5# 5r/   r   c                     ^  \ rS rSrS\4U 4S jjr\R                  4S\S\S\S\S\	S	\S
\S\S\S\S\
\\4   S\4S jjr\R                  4S\S\S\S\S\	S	\S
\S\S\S\S\
\\4   S\4S jjr\R                  \R                  SS4S\
\\4   S\
\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  SS4S\
\\4   S\
\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  SS4S\
\\4   S\
\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  SS4S\
\\4   S\
\\4   S\\   S\\   S\\   4
S jjr\R                  \R                  \R                  \R                  \R                  4S\
\\4   S\
\\4   S\
\\4   S\
\\4   S\
\\4   S\4S jjr\R                  \R                  \R                  \R                  \R                  4S\
\\4   S\
\\4   S\
\\4   S\
\\4   S\
\\4   S\4S jjrS\S\4S jrS\S\4S jrS \S\4S! jrS \S\4S" jrS\4S# jr S$r!U =r"$ )%AssessmentsListi  r   c                 2   > [         TU ]  U5        SU l        g)zU
Initialize the AssessmentsList

:param version: Version that contains the resource

z'/Insights/QualityManagement/AssessmentsN)r%   r&   rj   )r+   r   r,   s     r-   r&   AssessmentsList.__init__  s     	!=	r/   category_sidcategory_namer   r   r   	metric_idmetric_namer    r!   questionnaire_sidr8   r0   c                     [         R                  " UUUUUUUUU	U
S.
5      n[         R                  " USS.5      nSUS'   SUS'   U R                  R                  SU R                  XS9n[        U R                  U5      $ )	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AgentIdrn   MetricId
MetricNamero   rp   QuestionnaireSidrr   rq   rs   rs   rt   ru   rv   rw   )r   r|   r4   createrj   r   r+   r   r   r   r   r   r   r   r    r!   r   r8   rz   r{   r   s                  r-   r   AssessmentsList.create&  s    @ yy+ -'# %))%$5
 ))!. C
 #F.--&&tyyt ' 
 #4=='::r/   c                   #    [         R                  " UUUUUUUUU	U
S.
5      n[         R                  " USS.5      nSUS'   SUS'   U R                  R                  SU R                  XS9I S	h  vN n[        U R                  U5      $  N7f)
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   rr   r   rs   rt   ru   rv   rw   N)r   r|   r4   create_asyncrj   r   r   s                  r-   r   AssessmentsList.create_asynce  s     @ yy+ -'# %))%$5
 ))!. C
 #F.22tyyt 3 
 
 #4=='::	
s   A-B/B
0BNlimit	page_sizec                     U R                   R                  X45      nU R                  UUUS   S9nU R                   R                  XeS   5      $ )ao  
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   r8   r   r   r   )r4   read_limitspagestreamr+   r8   r   r   r   limitsr   s          r-   r   AssessmentsList.stream  sT    0 **5<yy'![)  
 }}##D/::r/   c                    #    U R                   R                  X45      nU R                  UUUS   S9I Sh  vN nU R                   R                  XeS   5      $  N"7f)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   )r4   r   
page_asyncstream_asyncr   s          r-   r   AssessmentsList.stream_async  sa     0 **5<__'![) % 
 
 }}))$w@@
s   3AA#Ac           	      8    [        U R                  UUUUS95      $ )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
r8   r   r   r   )listr   )r+   r8   r   r   r   s        r-   r   AssessmentsList.list  s.    . KK+%#	  
 	
r/   c                 z   #    U R                  UUUUS9I Sh  vN  Vs/ s Sh  vN nUPM   N N

 sn$ s  snf 7f)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+   r8   r   r   r   records         r-   
list_asyncAssessmentsList.list_async  sW     2 '+&7&7+%#	 '8 ' ! !
 
 !
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     [         R                  " UUUUUS.5      n[         R                  " USS.5      nSUS'   U R                  R                  SU R                  XgS9n[        U R                  U5      $ )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
rq   r   	PageTokenr   PageSizerr   r   rt   ru   GETrx   ry   paramsr{   )r   r|   r4   r   rj   r   	r+   r8   r   r   r   r   rz   r{   responses	            r-   r   AssessmentsList.page'  s    ( yy!.''#%
 ))!. C
 /==%%dii & 
 t}}h77r/   c                   #    [         R                  " UUUUUS.5      n[         R                  " USS.5      nSUS'   U R                  R                  SU R                  XgS9I Sh  vN n[        U R                  U5      $  N7f)	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   rr   r   rt   ru   r   r   N)r   r|   r4   r   rj   r   r   s	            r-   r   AssessmentsList.page_asyncS  s     ( yy!.''#%
 ))!. C
 /11dii 2 
 
 t}}h77
s   A#B%B &B
target_urlc                     U R                   R                  R                  R                  SU5      n[	        U R                   U5      $ )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   )r4   domaintwiliorequestr   r+   r   r   s      r-   get_pageAssessmentsList.get_page  s7     ==''..66ujIt}}h77r/   c                    #    U R                   R                  R                  R                  SU5      I Sh  vN n[	        U R                   U5      $  N7f)z
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)r4   r   r   request_asyncr   r   s      r-   get_page_asyncAssessmentsList.get_page_async  sC      --44BB5*UUt}}h77 Vs   4AAAr   c                 *    [        U R                  US9$ zb
Constructs a AssessmentsContext

:param assessment_sid: The SID of the assessment to be modified
r2   r3   r4   r+   r   s     r-   r'   AssessmentsList.get       "$--OOr/   c                 *    [        U R                  US9$ r   r   r   s     r-   __call__AssessmentsList.__call__  r   r/   c                     g)rD   z#<Twilio.FlexApi.V1.AssessmentsList>ri   r5   s    r-   rW   AssessmentsList.__repr__  r   r/   )rj   )#rY   rZ   r[   r\   r   r&   r   r`   r^   ra   r   rb   r   r   r   r   intr   r   r	   r   r   r   r   r   r   r   r   r   r3   r'   r   rW   rc   rd   re   s   @r-   r   r     sj   	> 	>. -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# 5 5r/   r   N)r]   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   r3   r   r   ri   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/   