
    i?1iF*                         d Z ddlmZmZ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)values)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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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     k/home/www/therecruiter.miabetepe.com/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._proxy9   s9     == 'NN5)DM }}r   c                 6    | j                   j                         S )U
        Fetch the UserInstance


        :returns: The fetched UserInstance
        )r2   fetchr1   s    r   r5   zUserInstance.fetchH   s     {{  ""r   c                 R   K   | j                   j                          d{   S 7 w)o
        Asynchronous coroutine to fetch the UserInstance


        :returns: The fetched UserInstance
        N)r2   fetch_asyncr1   s    r   r8   zUserInstance.fetch_asyncQ   s!      [[,,....s   '%'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#   )r2   updater*   r    r!   r"   r#   s        r   r<   zUserInstance.updateZ   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
        r;   N)r2   update_asyncr=   s        r   r@   zUserInstance.update_asyncr   s:     " [[--'%	 . 
 
 	
 
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(UserInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z(<Twilio.FrontlineApi.V1.UserInstance {}>joinr(   itemsrG   r*   contexts     r   __repr__zUserInstance.__repr__   s6     ((SDNN<P<P<RSS9@@IIr   )N)r,   r/   )r,   r   )r   r   r   objectr   r   r   strr   r   r&   propertyr2   r5   r8   r   unsetr   boolr<   r@   rT   __classcell__r+   s   @r   r   r      sb   $F $ OS44)-c3h4>Fsm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                       e Zd Zdedef 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defdZ xZS )r/   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(   rG   _uri)r*   r   r   r+   s      r   r&   zUserContext.__init__   s?     	! 3
 *N));DNN;	r   r,   c                     | j                   j                  d| j                        }t        | j                   || j                  d         S )r4   GETmethodurir   r.   )r0   r5   r^   r   r(   r*   r   s     r   r5   zUserContext.fetch   sL     --%%		 & 

 MMu%
 	
r   c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d         S 7 )w)r7   r`   ra   Nr   r.   )r0   r8   r^   r   r(   rd   s     r   r8   zUserContext.fetch_async   sZ      11		 2 
 

 MMu%
 	

s   +AA*Ar    r!   r"   r   r#   c                     t        j                  ||||d      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )r:   FriendlyNameAvatarStateIsAvailablePOSTrb   rc   datar   r.   )r   ofr0   r<   r^   r   r(   r*   r    r!   r"   r#   rn   r   s          r   r<   zUserContext.update   si    " yy - +	
 --&&		 ' 
 DMM7u8MNNr   c                    K   t        j                  ||||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r?   rg   rl   rm   Nr   r.   )r   ro   r0   r@   r^   r   r(   rp   s          r   r@   zUserContext.update_async   sw     " yy - +	
 22		 3 
 
 DMM7u8MNN
s   AA4A2	*A4c                     dj                  d | j                  j                         D              }dj                  |      S )rB   rC   c              3   F   K   | ]  \  }}d j                  ||        ywrE   rF   rH   s      r   rL   z'UserContext.__repr__.<locals>.<genexpr>  rM   rN   z'<Twilio.FrontlineApi.V1.UserContext {}>rO   rR   s     r   rT   zUserContext.__repr__  s6     ((SDNN<P<P<RSS8??HHr   )r   r   r   r   rV   r&   r   r5   r8   r   rX   r   rU   rY   r<   r@   rT   rZ   r[   s   @r   r/   r/      s<   < <c <
| 
&
< 
* -3LL%+\\9?,2LL OS&[) O c6k" O -v56	 O
 D&L) O 
 OH -3LL%+\\9?,2LL OS&[) O c6k" O -v56	 O
 D&L) O 
 ODI# Ir   r/   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.
        r.   r/   r0   r*   r   s     r   r'   zUserList.get"       4==c22r   c                 0    t        | j                  |      S rx   ry   rz   s     r   __call__zUserList.__call__*  r{   r   c                      y)rB   z!<Twilio.FrontlineApi.V1.UserList>r   r1   s    r   rT   zUserList.__repr__2  s     3r   )r   r   r   r   r&   rV   r/   r'   r}   rT   rZ   r[   s   @r   ru   ru     sA    " "3s 3{ 33C 3K 33# 3r   ru   N)__doc__typingr   r   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r/   ru   r   r   r   <module>r      sP    . -  8 : 2 'yJ# yJxAI/ AIH 3|  3r   