
    pivG                         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 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 - Assistants
    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values)InstanceContext)InstanceResource)ListResource)Version)Pagec            
            e Zd ZdZ	 ddedeeef   d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defdZ xZS )AssistantsToolInstanceaP  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource.
    :ivar description: The description of the tool.
    :ivar enabled: True if the tool is enabled.
    :ivar id: The tool ID.
    :ivar meta: The metadata related to method, url, input_schema to used with the Tool.
    :ivar name: The name of the tool.
    :ivar requires_auth: The authentication requirement for the tool.
    :ivar type: The type of the tool. ('WEBHOOK')
    :ivar url: The url of the tool resource.
    :ivar date_created: The date and time in GMT when the Tool 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 Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    versionpayloadassistant_ididc                    t         |   |       |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            | _        ||xs | j                  d| _        d | _        y )Naccount_siddescriptionenabledr   metanamerequires_authtypeurldate_createddate_updatedr   r   )super__init__getr   r   r   r   r   r   r   r   r    r   iso8601_datetimer!   r"   	_solution_context)selfr   r   r   r   	__class__s        u/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/assistants/v1/assistant/assistants_tool.pyr%   zAssistantsToolInstance.__init__(   s    	!*1++m*D*1++m*D'.{{9'=!(T!218V1D	#*;;v#6	-4[[-I#*;;v#6	")++e"40;0L0LKK'1
 1<0L0LKK'1

 )-
 :>    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: AssistantsToolContext for this AssistantsToolInstance
        r   r   r#   )r)   AssistantsToolContext_versionr(   r*   s    r,   _proxyzAssistantsToolInstance._proxyG   sE     == 1!^^N;>>$'DM
 }}r-   c                 6    | j                   j                         S )j
        Create the AssistantsToolInstance


        :returns: The created AssistantsToolInstance
        )r3   creater2   s    r,   r6   zAssistantsToolInstance.createW        {{!!##r-   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to create the AssistantsToolInstance


        :returns: The created AssistantsToolInstance
        N)r3   create_asyncr2   s    r,   r:   z#AssistantsToolInstance.create_async`   !      [[--////   '%'c                 6    | j                   j                         S )q
        Deletes the AssistantsToolInstance


        :returns: True if delete succeeds, False otherwise
        )r3   deleter2   s    r,   r?   zAssistantsToolInstance.deletei   r7   r-   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the AssistantsToolInstance


        :returns: True if delete succeeds, False otherwise
        N)r3   delete_asyncr2   s    r,   rB   z#AssistantsToolInstance.delete_asyncr   r;   r<   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>z2AssistantsToolInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z0<Twilio.Assistants.V1.AssistantsToolInstance {}>joinr(   itemsrI   r*   contexts     r,   __repr__zAssistantsToolInstance.__repr__{   s6     ((SDNN<P<P<RSSAHHQQr-   )N)r.   r0   )r.   r   )__name__
__module____qualname____doc__r   r   strr   r   r%   propertyr3   r6   r:   boolr?   rB   rV   __classcell__r+   s   @r,   r   r      s    & !>> c3h> 	>
 SM>>  $0$ $0D 0R# Rr-   r   c                   h     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 xZS )r0   r   r   r   c                 z    t         |   |       ||d| _         dj                  di | j                  | _        y)z
        Initialize the AssistantsToolContext

        :param version: Version that contains the resource
        :param assistant_id: The assistant ID.
        :param id: The tool ID.
        r#   z%/Assistants/{assistant_id}/Tools/{id}N r$   r%   r(   rI   _uri)r*   r   r   r   r+   s       r,   r%   zAssistantsToolContext.__init__   sB     	! )
 C;BBTT^^T	r-   r.   c                    t        j                  i       }t        j                  i       }| j                  j                  d| j                  ||      }t        | j                  || j                  d   | j                  d         S )r5   POSTmethoduridataheadersr   r   r#   r   ofr1   r6   rd   r   r(   r*   rj   rk   r   s       r,   r6   zAssistantsToolContext.create   su     yy}))B---&&tyytW ' 
 &MM7~~d#	
 	
r-   c                 *  K   t        j                  i       }t        j                  i       }| j                  j                  d| j                  ||       d{   }t        | j                  || j                  d   | j                  d         S 7 7w)r9   rf   rg   Nr   r   r#   r   rm   r1   r:   rd   r   r(   rn   s       r,   r:   z"AssistantsToolContext.create_async   s      yy}))B-22tyytW 3 
 
 &MM7~~d#	
 	
	
s   ABB8Bc                 |    t        j                  i       }| j                  j                  d| j                  |      S )r>   DELETErh   ri   rk   )r   rm   r1   r?   rd   r*   rk   s     r,   r?   zAssistantsToolContext.delete   s1     ))B-}}##8G#TTr-   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)rA   rr   rs   N)r   rm   r1   rB   rd   rt   s     r,   rB   z"AssistantsToolContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     dj                  d | j                  j                         D              }dj                  |      S )rD   rE   c              3   F   K   | ]  \  }}d j                  ||        ywrG   rH   rJ   s      r,   rN   z1AssistantsToolContext.__repr__.<locals>.<genexpr>   rO   rP   z/<Twilio.Assistants.V1.AssistantsToolContext {}>rQ   rT   s     r,   rV   zAssistantsToolContext.__repr__   s6     ((SDNN<P<P<RSS@GGPPr-   )rW   rX   rY   r   r[   r%   r   r6   r:   r]   r?   rB   rV   r^   r_   s   @r,   r0   r0      sc    U Us U U"
. 
,
$: 
,
U 
U
D 
Q# Qr-   r0   c                   2    e Zd Zdeeef   defdZdefdZy)AssistantsToolPager   r.   c                 L    t        | j                  || j                  d         S )zt
        Build an instance of AssistantsToolInstance

        :param payload: Payload response from the API
        r   r   )r   r1   r(   )r*   r   s     r,   get_instancezAssistantsToolPage.get_instance   s%     &MM71O
 	
r-   c                      y)rD   z)<Twilio.Assistants.V1.AssistantsToolPage>rb   r2   s    r,   rV   zAssistantsToolPage.__repr__        ;r-   N)	rW   rX   rY   r   r[   r   r   r|   rV   rb   r-   r,   ry   ry      s*    
DcN 
7M 
;# ;r-   ry   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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 )AssistantsToolListr   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the AssistantsToolList

        :param version: Version that contains the resource
        :param assistant_id: The assistant ID.

        r   z /Assistants/{assistant_id}/ToolsNrb   rc   )r*   r   r   r+   s      r,   r%   zAssistantsToolList.__init__   s@     	! L
 >6==OO	r-   r.   c                     t        j                  ddi      }| j                  j                  d| j                  |      }t        | j                  || j                  d         S )r5   Content-Type!application/x-www-form-urlencodedrf   rs   r   r{   rl   r*   rk   r   s      r,   r6   zAssistantsToolList.create  sX     ))^-PQR--&&f$))W&U%MM71O
 	
r-   c                    K   t        j                  ddi      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)zy
        Asynchronously create the AssistantsToolInstance


        :returns: The created AssistantsToolInstance
        r   r   rf   rs   Nr   r{   rp   r   s      r,   r:   zAssistantsToolList.create_async  sm      ))^-PQR22tyy' 3 
 
 &MM71O
 	
	
s   AA1A/*A1limit	page_sizec                     | j                   j                  ||      }| j                  |d         }| j                   j                  ||d         S )ad  
        Streams AssistantsToolInstance 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   )r1   read_limitspagestreamr*   r   r   limitsr   s        r,   r   zAssistantsToolList.stream1  sJ    ( **5)<yy6+#6y7}}##D&/::r-   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)as  
        Asynchronously streams AssistantsToolInstance 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   )r1   r   
page_asyncstream_asyncr   s        r,   r   zAssistantsToolList.stream_asyncJ  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            S )a  
        Lists AssistantsToolInstance 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AssistantsToolList.listc  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 AssistantsToolInstance 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AssistantsToolList.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                  || j                        S )a  
        Retrieve a single page of AssistantsToolInstance 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 AssistantsToolInstance
        	PageTokenr   PageSizer   r   application/jsonAcceptGETrh   ri   paramsrk   )r   rm   r1   r   rd   ry   r(   r*   r   r   r   rj   rk   responses          r,   r   zAssistantsToolList.page  s      yy'#%
 ))^-PQR.==%%diig & 
 "$--4>>JJr-   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	a  
        Asynchronously retrieve a single page of AssistantsToolInstance 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 AssistantsToolInstance
        r   r   r   r   r   r   r   N)r   rm   r1   r   rd   ry   r(   r   s          r,   r   zAssistantsToolList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 "$--4>>JJ
s   A"B$B
%&B
target_urlc                     | j                   j                  j                  j                  d|      }t	        | j                   || j
                        S )a  
        Retrieve a specific page of AssistantsToolInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AssistantsToolInstance
        r   )r1   domaintwiliorequestry   r(   r*   r   r   s      r,   get_pagezAssistantsToolList.get_page  s=     ==''..66ujI!$--4>>JJr-   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)a  
        Asynchronously retrieve a specific page of AssistantsToolInstance records from the API.
        Request is executed immediately

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

        :returns: Page of AssistantsToolInstance
        r   N)r1   r   r   request_asyncry   r(   r   s      r,   get_page_asyncz!AssistantsToolList.get_page_async  sJ      --44BB5*UU!$--4>>JJ Vs   4AA&Ar   c                 L    t        | j                  | j                  d   |      S zU
        Constructs a AssistantsToolContext

        :param id: The tool ID.
        r   r#   r0   r1   r(   r*   r   s     r,   r&   zAssistantsToolList.get  %     %MM~(F2
 	
r-   c                 L    t        | j                  | j                  d   |      S r   r   r   s     r,   __call__zAssistantsToolList.__call__  r   r-   c                      y)rD   z)<Twilio.Assistants.V1.AssistantsToolList>rb   r2   s    r,   rV   zAssistantsToolList.__repr__  r~   r-   )NN) rW   rX   rY   r   r[   r%   r   r6   r:   r   intr	   r   r
   r   r   r   r   r   unsetr   objectry   r   r   r   r   r0   r&   r   rV   r^   r_   s   @r,   r   r      s;   P Ps P 
. 
 
$: 
(  $#';}; C=; 
(	)	;6  $#'A}A C=A 
-	.	A6  $#'
}
 C=
 
$	%	
8  $#'
}
 C=
 
$	%	
: *0*0,,(.	K#v+&K 3;'K f%	K
 
KF *0*0,,(.	K#v+&K 3;'K f%	K
 
KB
K3 
K+= 
K
Ks 
K7I 
K
c 
3 

3 
#8 
;# ;r-   r   N)rZ   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r0   ry   r   rb   r-   r,   <module>r      sg     L L L + 8 : 2 ' !iR- iRX`QO `QF; ;*O; O;r-   