
    d{iG                         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 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)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc            
       ~    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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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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 )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        _/home/sas/my/fyp/ringai/.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._proxyO   sE     == +!^^N;"nn_=DM
 }}r.   c                 6    | j                   j                         S )]
        Fetch the FlexUserInstance


        :returns: The fetched FlexUserInstance
        )r4   fetchr3   s    r-   r7   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)r4   fetch_asyncr3   s    r-   r:   zFlexUserInstance.fetch_asynch   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the FlexUserInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r4   fetch_with_http_infor3   s    r-   r=   z%FlexUserInstance.fetch_with_http_infoq   s     {{//11r.   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the FlexUserInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r4   fetch_with_http_info_asyncr3   s    r-   r?   z+FlexUserInstance.fetch_with_http_info_asyncz   s!      [[;;====r;   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   )r4   updater+   r   r   r   s       r-   rC   zFlexUserInstance.update   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
        rB   N)r4   update_asyncrD   s       r-   rG   zFlexUserInstance.update_async   s7      [[-- . 
 
 	
 
   "+)+c                 >    | j                   j                  |||      S )a6  
        Update the FlexUserInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        rB   )r4   update_with_http_inforD   s       r-   rJ   z&FlexUserInstance.update_with_http_info   s)     {{00 1 
 	
r.   c                 Z   K   | j                   j                  |||       d{   S 7 w)aP  
        Asynchronous coroutine to update the FlexUserInstance with HTTP info

        :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: ApiResponse with instance, status code, and headers
        rB   N)r4   update_with_http_info_asyncrD   s       r-   rL   z,FlexUserInstance.update_with_http_info_async   s7      [[<< = 
 
 	
 
rH   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)   itemsrS   r+   contexts     r-   __repr__zFlexUserInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr.   )NN)r/   r1   )r/   r   )__name__
__module____qualname____doc__r   r   strr   r   r%   propertyr4   r7   r:   r   r=   r?   r
   unsetr   objectrC   rG   rJ   rL   r`   __classcell__r,   s   @r-   r   r      s   , '+'+!8!8 c3h!8 sm	!8
  }!8F  #/2k 2>+ > %+LL'-||%+\\	
S&[!
 V$
 c6k"	

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

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

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

 

*I# Ir.   r   c            	       \    e Zd Zdededef fdZdefdZdefdZ	de
fdZde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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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 )r1   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)   rS   _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                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r
   ofr2   fetch_with_response_inforn   r+   rv   s     r-   _fetchzFlexUserContext._fetch   sB     ))B-.}}55dii 6 
 	
r.   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         S )r6   r   r   r#   )rz   r   r2   r)   r+   r   _s      r-   r7   zFlexUserContext.fetch  sD     AMM7..9	
 	
r.   c                     | j                         \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )z
        Fetch the FlexUserInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r   r#   datastatus_coderv   )rz   r   r2   r)   r   r+   r   r   rv   instances        r-   r=   z$FlexUserContext.fetch_with_http_info  sS     )-%g#MM7..9	
 k7SSr.   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rp   rq   rr   rs   N)r
   rw   r2   fetch_with_response_info_asyncrn   ry   s     r-   _fetch_asynczFlexUserContext._fetch_async%  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)r9   Nr   r   r#   )r   r   r2   r)   r|   s      r-   r:   zFlexUserContext.fetch_async5  sS      #//11AMM7..9	
 	
 2s   AA<Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)z
        Asynchronous coroutine to fetch the FlexUserInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r   r#   r   )r   r   r2   r)   r   r   s        r-   r?   z*FlexUserContext.fetch_with_http_info_asyncD  sc      /3.?.?.A(A%g#MM7..9	
 k7SS )Bs   A"A A
A"r   r   r   c                     t        j                  |||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        EmailUserSidLocale!application/x-www-form-urlencodedContent-Typerp   rq   POSTrt   ru   r   rv   )r
   rw   r2   update_with_response_inforn   r+   r   r   r   r   rv   s         r-   _updatezFlexUserContext._updateT  sl     yy# 
 ))B-"E.}}66tyytW 7 
 	
r.   c                     | j                  |||      \  }}}t        | j                  || j                  d   | j                  d         S )rA   rB   r   r   r#   )r   r   r2   r)   r+   r   r   r   r   r}   s         r-   rC   zFlexUserContext.updater  sM     58FSAMM7..9	
 	
r.   c                     | j                  |||      \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S )aD  
        Update the FlexUserInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        rB   r   r   r#   r   )r   r   r2   r)   r   r+   r   r   r   r   r   rv   r   s           r-   rJ   z%FlexUserContext.update_with_http_info  sd     )-(6 )5 )
%g $MM7..9	
 k7SSr.   c                    K   t        j                  |||d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   rp   rq   r   r   N)r
   rw   r2   update_with_response_info_asyncrn   r   s         r-   _update_asynczFlexUserContext._update_async  s{      yy# 
 ))B-"E.]]BBtyytW C 
 
 	
 
s   A%A.'A,(A.c                    K   | j                  |||       d{   \  }}}t        | j                  || j                  d   | j                  d         S 7 ;w)rF   rB   Nr   r   r#   )r   r   r2   r)   r   s         r-   rG   zFlexUserContext.update_async  se      #00(6 1 
 
A  MM7..9	
 	

s   AA<Ac                    K   | j                  |||       d{   \  }}}t        | j                  || j                  d   | j                  d         }t	        |||      S 7 Iw)a^  
        Asynchronous coroutine to update the FlexUserInstance and return response metadata

        :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: ApiResponse with instance, status code, and headers
        rB   Nr   r   r#   r   )r   r   r2   r)   r   r   s           r-   rL   z+FlexUserContext.update_with_http_info_async  su      /3.@.@(6 /A /
 )
%g $MM7..9	
 k7SS)
s   A&A$A
A&c                     dj                  d | j                  j                         D              }dj                  |      S )rN   rO   c              3   F   K   | ]  \  }}d j                  ||        ywrQ   rR   rT   s      r-   rX   z+FlexUserContext.__repr__.<locals>.<genexpr>  rY   rZ   z&<Twilio.FlexApi.V2.FlexUserContext {}>r[   r^   s     r-   r`   zFlexUserContext.__repr__  s6     ((SDNN<P<P<RSS7>>wGGr.   )ra   rb   rc   r   re   r%   tuplerz   r   r7   r   r=   r   r:   r?   r
   rg   r   rh   r   rC   rJ   r   rG   rL   r`   ri   rj   s   @r-   r1   r1      s   
 
s 
3 
&
 
 
' 
Tk T 
E 
 
#3 
T+ T$ %+LL'-||%+\\	
S&[!
 V$
 c6k"	

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

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

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

 

6 %+LL'-||%+\\	TS&[!T V$T c6k"	T
 
T4H# Hr.   r1   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__   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#   r1   r2   r+   r   r   s      r-   r&   zFlexUserList.get	       MMM
 	
r.   c                 2    t        | j                  ||      S r   r   r   s      r-   __call__zFlexUserList.__call__  r   r.   c                      y)rN   z <Twilio.FlexApi.V2.FlexUserList>rm   r3   s    r-   r`   zFlexUserList.__repr__  s     2r.   )ra   rb   rc   r   r%   re   r1   r&   r   r`   ri   rj   s   @r-   r   r     sO    " "	
 	
C 	
O 	
	
S 	
 	
 	
2# 2r.   r   N)rd   r   typingr   r   r   r   r   twilio.baser	   r
   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r1   r   rm   r.   r-   <module>r      sV     3 3 + 0 8 : 2 'EI' EIPZHo ZHz'2< '2r.   