
    piU                         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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 G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Trusthub
    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	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                   6    e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       ZdefdZdefd	Zdd
ZddZej$                  ej$                  fdeeef   deeef   dd fdZej$                  ej$                  fdeeef   deeef   dd fdZdefdZ xZS )EndUserInstancea  
    :ivar sid: The unique string created by Twilio to identify the End User resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the End User resource.
    :ivar friendly_name: The string that you assigned to describe the resource.
    :ivar type: The type of end user of the Bundle resource - can be `individual` or `business`.
    :ivar attributes: The set of parameters that are the attributes of the End Users resource which are listed in the End User Types.
    :ivar date_created: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar date_updated: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    :ivar url: The absolute URL of the End User resource.
    versionpayloadsidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _
        t        j                  |j                  d            | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )	Nr   account_sidfriendly_nametype
attributesdate_createddate_updatedurl)super__init__getr   r   r   r   r   r   iso8601_datetimer   r   r   	_solution_context)selfr   r   r   	__class__s       b/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/trusthub/v1/end_user.pyr!   zEndUserInstance.__init__%   s     	!")++e"4*1++m*D,3KK,H#*;;v#6	7>{{<7P0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4 3?$((
 37    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: EndUserContext for this EndUserInstance
        r   r   )r%   EndUserContext_versionr$   r&   s    r(   _proxyzEndUserInstance._proxy<   s9     == *NN5)DM }}r)   c                 6    | j                   j                         S )j
        Deletes the EndUserInstance


        :returns: True if delete succeeds, False otherwise
        )r0   deleter/   s    r(   r3   zEndUserInstance.deleteK   s     {{!!##r)   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the EndUserInstance


        :returns: True if delete succeeds, False otherwise
        N)r0   delete_asyncr/   s    r(   r6   zEndUserInstance.delete_asyncT   s!      [[--////   '%'c                 6    | j                   j                         S )[
        Fetch the EndUserInstance


        :returns: The fetched EndUserInstance
        )r0   fetchr/   s    r(   r:   zEndUserInstance.fetch]   s     {{  ""r)   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the EndUserInstance


        :returns: The fetched EndUserInstance
        N)r0   fetch_asyncr/   s    r(   r=   zEndUserInstance.fetch_asyncf   s!      [[,,....r7   r   r   c                 <    | j                   j                  ||      S )5  
        Update the EndUserInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param attributes: The set of parameters that are the attributes of the End User resource which are derived End User Types.

        :returns: The updated EndUserInstance
        r   r   )r0   updater&   r   r   s      r(   rA   zEndUserInstance.updateo   s&     {{!!'! " 
 	
r)   c                 X   K   | j                   j                  ||       d{   S 7 w)O  
        Asynchronous coroutine to update the EndUserInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param attributes: The set of parameters that are the attributes of the End User resource which are derived End User Types.

        :returns: The updated EndUserInstance
        r@   N)r0   update_asyncrB   s      r(   rE   zEndUserInstance.update_async   s4      [[--'! . 
 
 	
 
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+EndUserInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z'<Twilio.Trusthub.V1.EndUserInstance {}>joinr$   itemsrL   r&   contexts     r(   __repr__zEndUserInstance.__repr__   s6     ((SDNN<P<P<RSS8??HHr)   )N)r*   r-   )r*   r   )__name__
__module____qualname____doc__r   r   strr   r   r!   propertyr0   boolr3   r6   r:   r=   r   unsetr   objectrA   rE   rY   __classcell__r'   s   @r(   r   r      s   	 OS77)-c3h7>Fsm7.  $ $0D 0#/ -3LL,2LL
S&[)
 &&.)
 
	
( -3LL,2LL
S&[)
 &&.)
 
	
$I# I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de	fdZ
de	fdZej                  ej                  fd	eeef   d
eeef   de	fdZej                  ej                  fd	ee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 EndUserContext

        :param version: Version that contains the resource
        :param sid: The unique string created by Twilio to identify the End User resource.
        r   z/EndUsers/{sid}N )r    r!   r$   rL   _uri)r&   r   r   r'   s      r(   r!   zEndUserContext.__init__   s@     	! 3
 -%,,>t~~>	r)   r*   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )r2   DELETEmethoduriheaders)r   ofr.   r3   rh   r&   rn   s     r(   r3   zEndUserContext.delete   s1     ))B-}}##8G#TTr)   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r5   rj   rk   N)r   ro   r.   r6   rh   rp   s     r(   r6   zEndUserContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r9   application/jsonAcceptGETrk   r   r,   )r   ro   r.   r:   rh   r   r$   r&   rn   r   s      r(   r:   zEndUserContext.fetch   s]     ))B-.--%%U		7%SMMu%
 	
r)   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r<   rs   rt   ru   rk   Nr   r,   )r   ro   r.   r=   rh   r   r$   rv   s      r(   r=   zEndUserContext.fetch_async   sr      ))B-.11dii 2 
 
 MMu%
 	
	
s   AA4A2	*A4r   r   c                 2   t        j                  |t        j                  |      d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
r?   FriendlyName
Attributes!application/x-www-form-urlencodedContent-Typers   rt   POSTrl   rm   datarn   r   r,   )	r   ro   r   rb   r.   rA   rh   r   r$   r&   r   r   r   rn   r   s         r(   rA   zEndUserContext.update   s     yy -'..z:
 ))B-"E.--&&tyytW ' 
 t}}g4>>%;PQQr)   c                 N  K   t        j                  |t        j                  |      d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)rD   ry   r|   r}   rs   rt   r~   r   Nr   r,   )	r   ro   r   rb   r.   rE   rh   r   r$   r   s         r(   rE   zEndUserContext.update_async  s      yy -'..z:
 ))B-"E.22tyytW 3 
 
 t}}g4>>%;PQQ	
s   A7B%9B#:*B%c                     dj                  d | j                  j                         D              }dj                  |      S )rG   rH   c              3   F   K   | ]  \  }}d j                  ||        ywrJ   rK   rM   s      r(   rQ   z*EndUserContext.__repr__.<locals>.<genexpr>8  rR   rS   z&<Twilio.Trusthub.V1.EndUserContext {}>rT   rW   s     r(   rY   zEndUserContext.__repr__2  s6     ((SDNN<P<P<RSS7>>wGGr)   )rZ   r[   r\   r   r^   r!   r`   r3   r6   r   r:   r=   r   ra   r   rb   rA   rE   rY   rc   rd   s   @r(   r-   r-      s    ? ?c ?
U 
U
D 

 
(
? 
0 -3LL,2LLRS&[)R &&.)R 
	RD -3LL,2LLRS&[)R &&.)R 
	R@H# Hr)   r-   c                   2    e Zd Zdeeef   defdZdefdZy)EndUserPager   r*   c                 .    t        | j                  |      S )zm
        Build an instance of EndUserInstance

        :param payload: Payload response from the API
        )r   r.   )r&   r   s     r(   get_instancezEndUserPage.get_instance>  s     t}}g66r)   c                      y)rG   z <Twilio.Trusthub.V1.EndUserPage>rg   r/   s    r(   rY   zEndUserPage.__repr__F       2r)   N)	rZ   r[   r\   r   r^   r   r   r   rY   rg   r)   r(   r   r   <  s)    7DcN 7 72# 2r)   r   c            	           e Zd Zdef fdZej                  fdededee	e	f   de
fdZej                  fdededee	e	f   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defdZdedefdZdefdZ xZS )EndUserListr   c                 2    t         |   |       d| _        y)zi
        Initialize the EndUserList

        :param version: Version that contains the resource

        z	/EndUsersN)r    r!   rh   )r&   r   r'   s     r(   r!   zEndUserList.__init__Q  s     	!	r)   r   r   r   r*   c                    t        j                  ||t        j                  |      d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  |      S )a  
        Create the EndUserInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param type: The type of end user of the Bundle resource - can be `individual` or `business`.
        :param attributes: The set of parameters that are the attributes of the End User resource which are derived End User Types.

        :returns: The created EndUserInstance
        rz   Typer{   r}   r|   rs   rt   r~   r   )r   ro   r   rb   r.   createrh   r   r&   r   r   r   r   rn   r   s          r(   r   zEndUserList.create\  s      yy -'..z:
 ))^-PQR"E.--&&tyytW ' 
 t}}g66r)   c                 6  K   t        j                  ||t        j                  |      d      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously create the EndUserInstance

        :param friendly_name: The string that you assigned to describe the resource.
        :param type: The type of end user of the Bundle resource - can be `individual` or `business`.
        :param attributes: The set of parameters that are the attributes of the End User resource which are derived End User Types.

        :returns: The created EndUserInstance
        r   r}   r|   rs   rt   r~   r   N)r   ro   r   rb   r.   create_asyncrh   r   r   s          r(   r   zEndUserList.create_async  s       yy -'..z:
 ))^-PQR"E.22tyytW 3 
 
 t}}g66	
s   A:B<B=Blimit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )a]  
        Streams EndUserInstance 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
        r   r   r   )r.   read_limitspagestreamr&   r   r   limitsr   s        r(   r   zEndUserList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r)   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)al  
        Asynchronously streams EndUserInstance 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
        r   r   Nr   )r.   r   
page_asyncstream_asyncr   s        r(   r   zEndUserList.stream_async  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists EndUserInstance 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   r   )listr   )r&   r   r   s      r(   r   zEndUserList.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 EndUserInstance 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&   r   r   records       r(   
list_asynczEndUserList.list_async  sT     * '+&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                  |      S )as  
        Retrieve a single page of EndUserInstance 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 EndUserInstance
        	PageTokenr   PageSizer}   r|   rs   rt   ru   rl   rm   paramsrn   )r   ro   r.   r   rh   r   r&   r   r   r   r   rn   responses          r(   r   zEndUserList.page	  sy      yy'#%
 ))^-PQR.==%%diig & 
 4==(33r)   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	a  
        Asynchronously retrieve a single page of EndUserInstance 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 EndUserInstance
        r   r}   r|   rs   rt   ru   r   N)r   ro   r.   r   rh   r   r   s          r(   r   zEndUserList.page_async*  s       yy'#%
 ))^-PQR.11diig 2 
 
 4==(33
s   A"B$A?%B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   |      S )z
        Retrieve a specific page of EndUserInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EndUserInstance
        ru   )r.   domaintwiliorequestr   r&   r   r   s      r(   get_pagezEndUserList.get_pageK  s7     ==''..66ujI4==(33r)   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)a  
        Asynchronously retrieve a specific page of EndUserInstance records from the API.
        Request is executed immediately

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

        :returns: Page of EndUserInstance
        ru   N)r.   r   r   request_asyncr   r   s      r(   get_page_asynczEndUserList.get_page_asyncW  sD      --44BB5*UU4==(33 Vs   4AAAr   c                 0    t        | j                  |      S z
        Constructs a EndUserContext

        :param sid: The unique string created by Twilio to identify the End User resource.
        r,   r-   r.   r&   r   s     r(   r"   zEndUserList.getc       dmm55r)   c                 0    t        | j                  |      S r   r   r   s     r(   __call__zEndUserList.__call__k  r   r)   c                      y)rG   z <Twilio.Trusthub.V1.EndUserList>rg   r/   s    r(   rY   zEndUserList.__repr__s  r   r)   )NN) rZ   r[   r\   r   r!   r   ra   r^   r   rb   r   r   r   r   intr	   r   r
   r   r   r   r   r   r   r   r   r   r-   r"   r   rY   rc   rd   s   @r(   r   r   O  s{   	  	  -3LL	!7!7 !7 &&.)	!7
 
!7N -3LL	!7!7 !7 &&.)	!7
 
!7J  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
: *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	4#v+&4 3;'4 f%	4
 
4B
43 
4; 
4
4s 
4{ 
46s 6~ 66C 6N 62# 2r)   r   N)r]   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r-   r   r   rg   r)   r(   <module>r      sj     L L L 6 6 8 : 2 ' !AI& AIH\H_ \H~2$ 2&j2, j2r)   