
    d{i\L                         d Z ddl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 - Frontline
    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OptionalUnion)	serializevalues)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc                       e Zd Z G d de      Z	 	 ddedeeef   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&                  ej&                  fdeeef   deeef   dedef   deeef   dd f
dZej&                  ej&                  ej&                  ej&                  fdeeef   deeef   dedef   deeef   dd f
dZej&                  ej&                  ej&                  ej&                  fdeeef   deeef   dedef   deeef   def
dZej&                  ej&                  ej&                  ej&                  fdeeef   deeef   dedef   deeef   def
dZdefdZ xZS )UserInstancec                       e Zd ZdZdZy)UserInstance.StateTypeactivedeactivatedN)__name__
__module____qualname__ACTIVEDEACTIVATED     _/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/frontline_api/v1/user.py	StateTyper      s    #r   r   versionpayloadsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        d|xs | j                  i| _
        d | _        y )Nr   identityfriendly_nameavatarstateis_availableurl)super__init__getr   r!   r"   r#   r$   r%   r&   	_solution_context)selfr   r   r   	__class__s       r   r(   zUserInstance.__init__(   s     	!")++e"4'.{{:'>,3KK,H%,[[%:9@W9M
,3KK,G")++e"4 3?$((
 04r   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: UserContext for this UserInstance
        r   r   )r+   UserContext_versionr*   r,   s    r   _proxyzUserInstance._proxy:   s9     == 'NN5)DM }}r   c                 6    | j                   j                         S )U
        Fetch the UserInstance


        :returns: The fetched UserInstance
        )r4   fetchr3   s    r   r7   zUserInstance.fetchI   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)o
        Asynchronous coroutine to fetch the UserInstance


        :returns: The fetched UserInstance
        N)r4   fetch_asyncr3   s    r   r:   zUserInstance.fetch_asyncR   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the UserInstance with HTTP info


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


        :returns: ApiResponse with instance, status code, and headers
        N)r4   fetch_with_http_info_asyncr3   s    r   r?   z'UserInstance.fetch_with_http_info_asyncd   s!      [[;;====r;   r"   r#   r$   r   r%   c                 @    | j                   j                  ||||      S )   
        Update the UserInstance

        :param friendly_name: The string that you assigned to describe the User.
        :param avatar: The avatar URL which will be shown in Frontline application.
        :param state:
        :param is_available: Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).

        :returns: The updated UserInstance
        r"   r#   r$   r%   )r4   updater,   r"   r#   r$   r%   s        r   rC   zUserInstance.updatem   s,    " {{!!'%	 " 
 	
r   c                 \   K   | j                   j                  ||||       d{   S 7 w):  
        Asynchronous coroutine to update the UserInstance

        :param friendly_name: The string that you assigned to describe the User.
        :param avatar: The avatar URL which will be shown in Frontline application.
        :param state:
        :param is_available: Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).

        :returns: The updated UserInstance
        rB   N)r4   update_asyncrD   s        r   rG   zUserInstance.update_async   s:     " [[--'%	 . 
 
 	
 
   #,*,c                 @    | j                   j                  ||||      S )aJ  
        Update the UserInstance with HTTP info

        :param friendly_name: The string that you assigned to describe the User.
        :param avatar: The avatar URL which will be shown in Frontline application.
        :param state:
        :param is_available: Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).

        :returns: ApiResponse with instance, status code, and headers
        rB   )r4   update_with_http_inforD   s        r   rJ   z"UserInstance.update_with_http_info   s,    " {{00'%	 1 
 	
r   c                 \   K   | j                   j                  ||||       d{   S 7 w)ad  
        Asynchronous coroutine to update the UserInstance with HTTP info

        :param friendly_name: The string that you assigned to describe the User.
        :param avatar: The avatar URL which will be shown in Frontline application.
        :param state:
        :param is_available: Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).

        :returns: ApiResponse with instance, status code, and headers
        rB   N)r4   update_with_http_info_asyncrD   s        r   rL   z(UserInstance.update_with_http_info_async   s:     " [[<<'%	 = 
 
 	
 
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(UserInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z(<Twilio.FrontlineApi.V1.UserInstance {}>joinr*   itemsrS   r,   contexts     r   __repr__zUserInstance.__repr__   s6     ((SDNN<P<P<RSS9@@IIr   )N)r.   r1   )r.   r   )r   r   r   objectr   r   r   strr   r   r(   propertyr4   r7   r:   r	   r=   r?   r   unsetr   boolrC   rG   rJ   rL   r`   __classcell__r-   s   @r   r   r      sl   $F $ OS44)-c3h4>Fsm4$  #/2k 2>+ > -3LL%+\\9?,2LL
S&[)
 c6k"
 -v56	

 D&L)
 

4 -3LL%+\\9?,2LL
S&[)
 c6k"
 -v56	

 D&L)
 

4 -3LL%+\\9?,2LL
S&[)
 c6k"
 -v56	

 D&L)
 

4 -3LL%+\\9?,2LL
S&[)
 c6k"
 -v56	

 D&L)
 

0J# Jr   r   c                   0    e Zd Z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                   ej                   fdeeef   deeef   dedef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   dedef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   dedef   deeef   de
f
dZej                   ej                   ej                   ej                   fdeeef   deeef   dedef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   dedef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   dedef   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 UserContext

        :param version: Version that contains the resource
        :param sid: The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update.
        r   z/Users/{sid}Nr   )r'   r(   r*   rS   _uri)r,   r   r   r-   s      r   r(   zUserContext.__init__   s?     	! 3
 *N));DNN;	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_inforj   r,   rr   s     r   _fetchzUserContext._fetch   sB     ))B-.}}55dii 6 
 	
r   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r6   r   r0   )rv   r   r2   r*   r,   r   _s      r   r7   zUserContext.fetch   s8     AMMu%
 	
r   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the UserInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r0   datastatus_coderr   )rv   r   r2   r*   r	   r,   r   r}   rr   instances        r   r=   z UserContext.fetch_with_http_info  sG     )-%gMMu%

 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)
        rl   rm   rn   ro   N)r   rs   r2   fetch_with_response_info_asyncrj   ru   s     r   _fetch_asynczUserContext._fetch_async  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r9   Nr   r0   )r   r   r2   r*   rx   s      r   r:   zUserContext.fetch_async%  sG      #//11AMMu%
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the UserInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r0   r{   )r   r   r2   r*   r	   r~   s        r   r?   z&UserContext.fetch_with_http_info_async3  sW      /3.?.?.A(A%gMMu%

 k7SS )Bs   AA<Ar"   r#   r$   r   r%   c                     t        j                  |||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)
        FriendlyNameAvatarStateIsAvailable!application/x-www-form-urlencodedContent-Typerl   rm   POSTrp   rq   r|   rr   )r   rs   r   boolean_to_stringr2   update_with_response_inforj   r,   r"   r#   r$   r%   r|   rr   s          r   _updatezUserContext._updateB  sz     yy - (::<H	
 ))B-"E.}}66tyytW 7 
 	
r   c                 ~    | j                  ||||      \  }}}t        | j                  || j                  d         S )rA   rB   r   r0   )r   r   r2   r*   r,   r"   r#   r$   r%   r   ry   s          r   rC   zUserContext.updateb  sG    " '%	 % 
A DMM7u8MNNr   c                     | j                  ||||      \  }}}t        | j                  || j                  d         }t	        |||      S )aX  
        Update the UserInstance and return response metadata

        :param friendly_name: The string that you assigned to describe the User.
        :param avatar: The avatar URL which will be shown in Frontline application.
        :param state:
        :param is_available: Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).

        :returns: ApiResponse with instance, status code, and headers
        rB   r   r0   r{   )r   r   r2   r*   r	   	r,   r"   r#   r$   r%   r   r}   rr   r   s	            r   rJ   z!UserContext.update_with_http_info{  sV    " )-'%	 )5 )
%g  wDNN5<QRk7SSr   c                   K   t        j                  |||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   rl   rm   r   r   N)r   rs   r   r   r2   update_with_response_info_asyncrj   r   s          r   _update_asynczUserContext._update_async  s      yy - (::<H	
 ))B-"E.]]BBtyytW C 
 
 	
 
s   A9B;B <Bc                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         S 7 -w)rF   rB   Nr   r0   )r   r   r2   r*   r   s          r   rG   zUserContext.update_async  sW     " #00'%	 1 
 
A DMM7u8MNN
s   AA	.Ac                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)ar  
        Asynchronous coroutine to update the UserInstance and return response metadata

        :param friendly_name: The string that you assigned to describe the User.
        :param avatar: The avatar URL which will be shown in Frontline application.
        :param state:
        :param is_available: Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).

        :returns: ApiResponse with instance, status code, and headers
        rB   Nr   r0   r{   )r   r   r2   r*   r	   r   s	            r   rL   z'UserContext.update_with_http_info_async  sg     " /3.@.@'%	 /A /
 )
%g  wDNN5<QRk7SS)
s   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'UserContext.__repr__.<locals>.<genexpr>  rY   rZ   z'<Twilio.FrontlineApi.V1.UserContext {}>r[   r^   s     r   r`   zUserContext.__repr__  s6     ((SDNN<P<P<RSS8??HHr   )r   r   r   r   rb   r(   tuplerv   r   r7   r	   r=   r   r:   r?   r   rd   r   ra   re   r   rC   rJ   r   rG   rL   r`   rf   rg   s   @r   r1   r1      s`   < <c <
 
 
| 
Tk T
E 
 
< 
T+ T" -3LL%+\\9?,2LL
S&[)
 c6k"
 -v56	

 D&L)
 

D -3LL%+\\9?,2LLOS&[)O c6k"O -v56	O
 D&L)O 
O6 -3LL%+\\9?,2LLTS&[)T c6k"T -v56	T
 D&L)T 
T8 -3LL%+\\9?,2LL
S&[)
 c6k"
 -v56	

 D&L)
 

D -3LL%+\\9?,2LLOS&[)O c6k"O -v56	O
 D&L)O 
O6 -3LL%+\\9?,2LLTS&[)T c6k"T -v56	T
 D&L)T 
T4I# Ir   r1   c                   P     e Zd Zdef 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 )UserListr   c                 $    t         |   |       y)zf
        Initialize the UserList

        :param version: Version that contains the resource

        N)r'   r(   )r,   r   r-   s     r   r(   zUserList.__init__  s     	!r   r   r.   c                 0    t        | j                  |      S z
        Constructs a UserContext

        :param sid: The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update.
        r0   r1   r2   r,   r   s     r   r)   zUserList.get       4==c22r   c                 0    t        | j                  |      S r   r   r   s     r   __call__zUserList.__call__  r   r   c                      y)rN   z!<Twilio.FrontlineApi.V1.UserList>r   r3   s    r   r`   zUserList.__repr__  s     3r   )r   r   r   r   r(   rb   r1   r)   r   r`   rf   rg   s   @r   r   r     sA    " "3s 3{ 33C 3K 33# 3r   r   N)__doc__typingr   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   r   r   r   <module>r      sS    . - ) 0 8 : 2 '|J# |J~XI/ XIv!3| !3r   