
    m>h;                         d Z ddlm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  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ListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceResource)ListResource)Version)Pagec                   Z     e Zd Z G d de      Z	 dedeeef   def fdZ	defdZ
 xZS )	FeedbackInstancec                   ,    e Zd ZdZdeeef   fdZd Zy)9FeedbackInstance.AssistantsV1ServiceCreateFeedbackRequest
        :ivar message_id: The message ID.
        :ivar score: The score to be given(0-1).
        :ivar session_id: The Session ID.
        :ivar text: The text to be given as feedback.
        payloadc                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y N
message_idscore
session_idtextgetr   r   r   r   selfr   s     p/var/www/html/DP/alpha_backend/venv/lib/python3.12/site-packages/twilio/rest/assistants/v1/assistant/feedback.py__init__zBFeedbackInstance.AssistantsV1ServiceCreateFeedbackRequest.__init__#   B    -4[[-FDO*1++g*>DJ-4[[-FDO'.{{6':DI    c                 `    | j                   | j                  | j                  | j                  dS Nr   r   r   r   r'   r    s    r!   to_dictzAFeedbackInstance.AssistantsV1ServiceCreateFeedbackRequest.to_dict*   (    "oo"oo			 r$   N	__name__
__module____qualname____doc__r   strr   r"   r)    r$   r!   (AssistantsV1ServiceCreateFeedbackRequestr           		;DcN 	;	r$   r2   versionr   idc                 :   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        t        j                  |j                  d	            | _        t        j                  |j                  d
            | _        d|i| _        y )Nassistant_idr5   account_siduser_sidr   r   r   r   date_createddate_updated)superr"   r   r7   r5   r8   r9   r   r   r   r   r   iso8601_datetimer:   r;   	_solution)r    r4   r   r5   	__class__s       r!   r"   zFeedbackInstance.__init__?   s    !+2;;~+F!(T!2*1++m*D'.{{:'>)0\)B&-kk'&:
)0\)B#*;;v#6	0;0L0LKK'1
 1<0L0LKK'1

 "
r$   returnc                     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,FeedbackInstance.__repr__.<locals>.<genexpr>[   s"     S<RDAq7>>!Q/<Rs   !z*<Twilio.Assistants.V1.FeedbackInstance {}>)joinr>   itemsrE   )r    contexts     r!   __repr__zFeedbackInstance.__repr__U   s6     ((SDNN<P<P<RSS;BB7KKr$   )r,   r-   r.   objectr2   r   r   r0   r   r"   rM   __classcell__r?   s   @r!   r   r      sD    6 .
 
$sCx. 
c 
,L# Lr$   r   c                   2    e Zd Zdeeef   defdZdefdZy)FeedbackPager   r@   c                 L    t        | j                  || j                  d         S )zn
        Build an instance of FeedbackInstance

        :param payload: Payload response from the API
        r5   r5   )r   _versionr>   r   s     r!   get_instancezFeedbackPage.get_instancea   s       w4>>$;OPPr$   c                      y)rB   z#<Twilio.Assistants.V1.FeedbackPage>r1   r(   s    r!   rM   zFeedbackPage.__repr__i        5r$   N)	r,   r-   r.   r   r0   r   r   rV   rM   r1   r$   r!   rR   rR   _   s-    QDcN Q7G Q5# 5r$   rR   c            	       .    e Zd Z G d de      Zdedef fdZdedefdZ	dedefd	Z
	 	 dd
ee   dee   dee   fdZ	 	 dd
ee   dee   dee   fdZ	 	 dd
ee   dee   dee   fdZ	 	 dd
ee   dee   dee   fdZej*                  ej*                  ej*                  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*                  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fdZ xZS )FeedbackListc                   ,    e Zd ZdZdeeef   fdZd Zy)5FeedbackList.AssistantsV1ServiceCreateFeedbackRequestr   r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r   r   r   s     r!   r"   z>FeedbackList.AssistantsV1ServiceCreateFeedbackRequest.__init__|   r#   r$   c                 `    | j                   | j                  | j                  | j                  dS r&   r'   r(   s    r!   r)   z=FeedbackList.AssistantsV1ServiceCreateFeedbackRequest.to_dict   r*   r$   Nr+   r1   r$   r!   r2   r\   t   r3   r$   r2   r4   r5   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the FeedbackList

        :param version: Version that contains the resource
        :param id: The assistant ID.

        r5   z/Assistants/{id}/FeedbacksNr1   )r<   r"   r>   rE   _uri)r    r4   r5   r?   s      r!   r"   zFeedbackList.__init__   s@     	! "
 8077I$..I	r$   -assistants_v1_service_create_feedback_requestr@   c                     |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||      }t        | j                  || j                  d         S )	z
        Create the FeedbackInstance

        :param assistants_v1_service_create_feedback_request:

        :returns: The created FeedbackInstance
        Content-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheadersr5   rT   )r)   r   ofrU   creater`   r   r>   r    ra   rk   rl   r   s        r!   rn   zFeedbackList.create   s~     =DDF))^-PQR"4.--&&tyytW ' 
  w4>>$;OPPr$   c                   K   |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||       d{   }t        | j                  || j                  d   	      S 7 )w)
z
        Asynchronously create the FeedbackInstance

        :param assistants_v1_service_create_feedback_request:

        :returns: The created FeedbackInstance
        rc   rd   re   rf   rg   rh   Nr5   rT   )r)   r   rm   rU   create_asyncr`   r   r>   ro   s        r!   rq   zFeedbackList.create_async   s      =DDF))^-PQR"4.22tyytW 3 
 
  w4>>$;OPP	
s   AB B
!*Blimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a^  
        Streams FeedbackInstance 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 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
        rs   rs   rr   )rU   read_limitspagestreamr    rr   rs   limitsrw   s        r!   rx   zFeedbackList.stream   sJ    ( **5)<yy6+#6y7}}##D&/::r$   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)am  
        Asynchronously streams FeedbackInstance 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 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
        rs   ru   Nrr   )rU   rv   
page_asyncstream_asyncry   s        r!   r}   zFeedbackList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists FeedbackInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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
        rr   rs   )listrx   )r    rr   rs   s      r!   r   zFeedbackList.list   s(    & KK#  
 	
r$   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)a
  
        Asynchronously lists FeedbackInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :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    rr   rs   records       r!   
list_asynczFeedbackList.list_async  sY     * '+&7&7# '8 ' ! !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                        S )au  
        Retrieve a single page of FeedbackInstance records from the API.
        Request is executed immediately

        :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 FeedbackInstance
        	PageTokenr   PageSizerc   rd   re   rf   GETri   rj   paramsrl   )r   rm   rU   rw   r`   rR   r>   r    r   r   rs   rk   rl   responses          r!   rw   zFeedbackList.page4  s      yy'#%
 ))^-PQR.==%%diig & 
 DMM8T^^DDr$   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of FeedbackInstance records from the API.
        Request is executed immediately

        :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 FeedbackInstance
        r   rc   rd   re   rf   r   r   N)r   rm   rU   r|   r`   rR   r>   r   s          r!   r|   zFeedbackList.page_asyncU  s       yy'#%
 ))^-PQR.11diig 2 
 
 DMM8T^^DD
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )z
        Retrieve a specific page of FeedbackInstance records from the API.
        Request is executed immediately

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

        :returns: Page of FeedbackInstance
        r   )rU   domaintwiliorequestrR   r>   r    r   r   s      r!   get_pagezFeedbackList.get_pagev  s=     ==''..66ujIDMM8T^^DDr$   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of FeedbackInstance records from the API.
        Request is executed immediately

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

        :returns: Page of FeedbackInstance
        r   N)rU   r   r   request_asyncrR   r>   r   s      r!   get_page_asynczFeedbackList.get_page_async  sJ      --44BB5*UUDMM8T^^DD Vs   4AA&Ac                      y)rB   z#<Twilio.Assistants.V1.FeedbackList>r1   r(   s    r!   rM   zFeedbackList.__repr__  rX   r$   )NN)r,   r-   r.   rN   r2   r   r0   r"   r   rn   rq   r   intr	   rx   r
   r}   r   r   r   r   unsetr   rR   rw   r|   r   r   rM   rO   rP   s   @r!   rZ   rZ   r   s7   6 .J JS J Q7_Q 
Q2Q7_Q 
Q6  $#';}; C=; 
"	#	;6  $#'A}A C=A 
'	(	A6  $#'
}
 C=
 
		
8  $#'
}
 C=
 
		
: *0*0,,(.	E#v+&E 3;'E f%	E
 
EF *0*0,,(.	E#v+&E 3;'E f%	E
 
EB
E3 
E< 
E
Es 
E| 
E5# 5r$   rZ   N)r/   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   rR   rZ   r1   r$   r!   <module>r      sS     L L L + : 2 ' !CL' CLL54 5&b5< b5r$   