
    pi-                         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
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.
    )datetime)AnyDictListOptionalUnion)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc            
       r    e Zd ZdZ	 	 ddedeeef   dee   dee   f fdZ	e
dd       Zdd	Zd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d 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d fdZdefdZ xZS )FlexUserInstancea  
    :ivar account_sid: The unique SID of the account that created the resource.
    :ivar instance_sid: The unique ID created by Twilio to identify a Flex instance.
    :ivar user_sid: The unique SID identifier of the Twilio Unified User.
    :ivar flex_user_sid: The unique SID identifier of the Flex User.
    :ivar worker_sid: The unique SID identifier of the worker.
    :ivar workspace_sid: The unique SID identifier of the workspace.
    :ivar flex_team_sid: The unique SID identifier of the Flex Team.
    :ivar username: Username of the User.
    :ivar email: Email of the User.
    :ivar locale: The locale preference of the user.
    :ivar roles: The roles of the user.
    :ivar created_date: The date that this user was created, given in ISO 8601 format.
    :ivar updated_date: The date that this user was updated, given in ISO 8601 format.
    :ivar version: The current version of the user.
    :ivar url:
    versionpayloadinstance_sidflex_user_sidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        |j                  d	      | _        |j                  d
      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _        t        j$                  |j                  d            | _        |j                  d      | _        |xs | j                  |xs | j                  d| _        d | _        y )Naccount_sidr   user_sidr   
worker_sidworkspace_sidflex_team_sidusernameemaillocalerolescreated_dateupdated_dater   urlr   r   )super__init__getr   r   r   r   r   r   r   r   r   r   r   r	   iso8601_datetimer   r    integerr   r!   	_solution_context)selfr   r   r   r   	__class__s        c/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/flex_api/v2/flex_user.pyr$   zFlexUserInstance.__init__+   sd    	!*1++m*D+2;;~+F'.{{:'>,3KK,H)0\)B,3KK,H,3KK,H'.{{:'>$+KK$8
%,[[%:*1++g*>
0;0L0LKK'1
 1<0L0LKK'1
 '2&9&9'++i:P&Q")++e"4 )=D,=,=*@d.@.@
 48    returnc                     | j                   7t        | j                  | j                  d   | 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: FlexUserContext for this FlexUserInstance
        r   r   r"   )r)   FlexUserContext_versionr(   r*   s    r,   _proxyzFlexUserInstance._proxyN   sE     == +!^^N;"nn_=DM
 }}r-   c                 6    | j                   j                         S )]
        Fetch the FlexUserInstance


        :returns: The fetched FlexUserInstance
        )r3   fetchr2   s    r,   r6   zFlexUserInstance.fetch^   s     {{  ""r-   c                 R   K   | j                   j                          d{   S 7 w)w
        Asynchronous coroutine to fetch the FlexUserInstance


        :returns: The fetched FlexUserInstance
        N)r3   fetch_asyncr2   s    r,   r9   zFlexUserInstance.fetch_asyncg   s!      [[,,....s   '%'r   r   r   c                 >    | j                   j                  |||      S )  
        Update the FlexUserInstance

        :param email: Email of the User.
        :param user_sid: The unique SID identifier of the Twilio Unified User.
        :param locale: The locale preference of the user.

        :returns: The updated FlexUserInstance
        r   r   r   )r3   updater*   r   r   r   s       r,   r=   zFlexUserInstance.updatep   s)     {{!! " 
 	
r-   c                 Z   K   | j                   j                  |||       d{   S 7 w)*  
        Asynchronous coroutine to update the FlexUserInstance

        :param email: Email of the User.
        :param user_sid: The unique SID identifier of the Twilio Unified User.
        :param locale: The locale preference of the user.

        :returns: The updated FlexUserInstance
        r<   N)r3   update_asyncr>   s       r,   rA   zFlexUserInstance.update_async   s7      [[-- . 
 
 	
 
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,FlexUserInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z'<Twilio.FlexApi.V2.FlexUserInstance {}>joinr(   itemsrH   r*   contexts     r,   __repr__zFlexUserInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr-   )NN)r.   r0   )r.   r   )__name__
__module____qualname____doc__r   r   strr   r   r$   propertyr3   r6   r9   r
   unsetr   objectr=   rA   rU   __classcell__r+   s   @r,   r   r      s2   , '+'+!8!8 c3h!8 sm	!8
  }!8F  #/ %+LL'-||%+\\	
S&[!
 V$
 c6k"	

 

. %+LL'-||%+\\	
S&[!
 V$
 c6k"	

 

*I# Ir-   r   c            	       D    e Zd Zdededef fdZdefdZ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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fdZ xZS )r0   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)a  
        Initialize the FlexUserContext

        :param version: Version that contains the resource
        :param instance_sid: The unique ID created by Twilio to identify a Flex instance.
        :param flex_user_sid: The unique id for the flex user.
        r"   z//Instances/{instance_sid}/Users/{flex_user_sid}N )r#   r$   r(   rH   _uri)r*   r   r   r   r+   s       r,   r$   zFlexUserContext.__init__   sG     	! )*
 MELL 
nn
	r-   r.   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d   | j                  d         S )r5   application/jsonAcceptGETmethoduriheadersr   r   r"   )r
   ofr1   r6   rc   r   r(   r*   rk   r   s      r,   r6   zFlexUserContext.fetch   si     ))B-.--%%U		7%SMM7..9	
 	
r-   c                   K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)	r8   re   rf   rg   rh   Nr   r   r"   )r
   rl   r1   r9   rc   r   r(   rm   s      r,   r9   zFlexUserContext.fetch_async   s~      ))B-.11dii 2 
 
  MM7..9	
 	
	
s   ABB 	8Br   r   r   c                 *   t        j                  |||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d	   
      S )r;   EmailUserSidLocale!application/x-www-form-urlencodedContent-Typere   rf   POSTri   rj   datark   r   r   r"   )r
   rl   r1   r=   rc   r   r(   r*   r   r   r   rx   rk   r   s          r,   r=   zFlexUserContext.update   s      yy# 
 ))B-"E.--&&tyytW ' 
  MM7..9	
 	
r-   c                 F  K   t        j                  |||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   | j                  d
         S 7 7w)r@   rp   rt   ru   re   rf   rv   rw   Nr   r   r"   )r
   rl   r1   rA   rc   r   r(   ry   s          r,   rA   zFlexUserContext.update_async  s       yy# 
 ))B-"E.22tyytW 3 
 
  MM7..9	
 	
	
s   A%B!'B(8B!c                     dj                  d | j                  j                         D              }dj                  |      S )rC   rD   c              3   F   K   | ]  \  }}d j                  ||        ywrF   rG   rI   s      r,   rM   z+FlexUserContext.__repr__.<locals>.<genexpr>;  rN   rO   z&<Twilio.FlexApi.V2.FlexUserContext {}>rP   rS   s     r,   rU   zFlexUserContext.__repr__5  s6     ((SDNN<P<P<RSS7>>wGGr-   )rV   rW   rX   r   rZ   r$   r   r6   r9   r
   r\   r   r]   r=   rA   rU   r^   r_   s   @r,   r0   r0      s   
 
s 
3 
&
' 
*
#3 
2 %+LL'-||%+\\	&
S&[!&
 V$&
 c6k"	&

 
&
T %+LL'-||%+\\	&
S&[!&
 V$&
 c6k"	&

 
&
PH# Hr-   r0   c                   X     e Zd Zdef fdZdededefdZdededefdZdefdZ	 xZ
S )	FlexUserListr   c                 $    t         |   |       y)zj
        Initialize the FlexUserList

        :param version: Version that contains the resource

        N)r#   r$   )r*   r   r+   s     r,   r$   zFlexUserList.__init__A  s     	!r-   r   r   r.   c                 2    t        | j                  ||      S z
        Constructs a FlexUserContext

        :param instance_sid: The unique ID created by Twilio to identify a Flex instance.
        :param flex_user_sid: The unique id for the flex user.
        r"   r0   r1   r*   r   r   s      r,   r%   zFlexUserList.getJ       MMM
 	
r-   c                 2    t        | j                  ||      S r   r   r   s      r,   __call__zFlexUserList.__call__U  r   r-   c                      y)rC   z <Twilio.FlexApi.V2.FlexUserList>rb   r2   s    r,   rU   zFlexUserList.__repr__`  s     2r-   )rV   rW   rX   r   r$   rZ   r0   r%   r   rU   r^   r_   s   @r,   r~   r~   ?  sO    " "	
 	
C 	
O 	
	
S 	
 	
 	
2# 2r-   r~   N)rY   r   typingr   r   r   r   r   twilio.baser	   r
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r0   r~   rb   r-   r,   <module>r      sS     3 3 + 8 : 2 'II' IIXXHo XHv'2< '2r-   