
    p h2                         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  G d	 d
e          Z G d de          Z G d de          ZdS )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)InstanceResource)ListResource)Version)Pagec                   H     e Zd ZdZdedeeef         f fdZdefdZ	 xZ
S )PolicyInstancea  
    :ivar id: The Policy ID.
    :ivar name: The name of the policy.
    :ivar description: The description of the policy.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Policy resource.
    :ivar user_sid: The SID of the User that created the Policy resource.
    :ivar type: The type of the policy.
    :ivar policy_details: The details of the policy based on the type.
    :ivar date_created: The date and time in GMT when the Policy 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 Policy was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
    versionpayloadc                 f   t                                          |           |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _	        t          j        |                    d                    | _        t          j        |                    d	                    | _        d S )
Nidnamedescriptionaccount_siduser_sidtypepolicy_detailsdate_createddate_updated)super__init__getr   r   r   r   r   r   r   r   iso8601_datetimer   r   )selfr   r   	__class__s      \/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/twilio/rest/assistants/v1/policy.pyr    zPolicyInstance.__init__&   s    !!!!(T!2!2#*;;v#6#6	*1++m*D*D*1++m*D*D'.{{:'>'>#*;;v#6#6	;B;;GW;X;X0;0LKK''1
 1
 1<0LKK''1
 1
    returnc                     dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z%<Twilio.Assistants.V1.PolicyInstance> r#   s    r%   __repr__zPolicyInstance.__repr__7   s
     76r&   )__name__
__module____qualname____doc__r   r   strr   r    r,   __classcell__r$   s   @r%   r   r      sx        
 

 
$sCx. 
 
 
 
 
 
"7# 7 7 7 7 7 7 7 7r&   r   c                   :    e Zd Zdeeef         defdZdefdZdS )
PolicyPager   r'   c                 ,    t          | j        |          S )zl
        Build an instance of PolicyInstance

        :param payload: Payload response from the API
        )r   _version)r#   r   s     r%   get_instancezPolicyPage.get_instanceC   s     dmW555r&   c                     dS )r)   z!<Twilio.Assistants.V1.PolicyPage>r*   r+   s    r%   r,   zPolicyPage.__repr__K   
     32r&   N)	r-   r.   r/   r   r1   r   r   r8   r,   r*   r&   r%   r5   r5   A   sY        6DcN 6~ 6 6 6 63# 3 3 3 3 3 3r&   r5   c                       e Zd Zdef fdZej        ej        ddfdeee	f         deee	f         de
e         de
e         dee         f
d	Zej        ej        ddfdeee	f         deee	f         de
e         de
e         dee         f
d
Zej        ej        ddfdeee	f         deee	f         de
e         de
e         dee         f
dZej        ej        ddfdeee	f         deee	f         de
e         de
e         dee         f
dZej        ej        ej        ej        ej        fdeee	f         deee	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        ej        ej        fdeee	f         deee	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fdZ xZS )
PolicyListr   c                 X    t                                          |           d| _        dS )zh
        Initialize the PolicyList

        :param version: Version that contains the resource

        z	/PoliciesN)r   r    _uri)r#   r   r$   s     r%   r    zPolicyList.__init__V   s(     	!!!			r&   Ntool_idknowledge_idlimit	page_sizer'   c                     | j                             ||          }|                     |||d                   }| j                             ||d                   S )a  
        Streams PolicyInstance 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 str tool_id: The tool ID.
        :param str knowledge_id: The knowledge ID.
        :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
        rB   r?   r@   rB   rA   )r7   read_limitspagestreamr#   r?   r@   rA   rB   limitsrF   s          r%   rG   zPolicyList.streama   s]    0 **5)<<yy,&BU  
 
 }##D&/:::r&   c                    K   | j                             ||          }|                     |||d                    d{V }| j                             ||d                   S )a  
        Asynchronously streams PolicyInstance 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 str tool_id: The tool ID.
        :param str knowledge_id: The knowledge ID.
        :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
        rB   rD   NrA   )r7   rE   
page_asyncstream_asyncrH   s          r%   rL   zPolicyList.stream_async   s      0 **5)<<__,&BU % 
 
 
 
 
 
 
 
 }))$w@@@r&   c                 N    t          |                     ||||                    S )aU  
        Lists PolicyInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str tool_id: The tool ID.
        :param str knowledge_id: The knowledge ID.
        :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@   rA   rB   )listrG   r#   r?   r@   rA   rB   s        r%   rO   zPolicyList.list   s8    . KK)#	   
 
 	
r&   c                 d   K   d |                      ||||           d{V 2              d{V S )ad  
        Asynchronously lists PolicyInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str tool_id: The tool ID.
        :param str knowledge_id: The knowledge ID.
        :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
        c                 $   K   g | 3 d {V 	 }|6 S )Nr*   ).0records     r%   
<listcomp>z)PolicyList.list_async.<locals>.<listcomp>   sO       
 
 
 
 
 
 
 
 
 
 
 
 
s   rN   N)rL   rP   s        r%   
list_asynczPolicyList.list_async   s      .
 
&*&7&7)#	 '8 ' ' ! ! ! ! ! !
 
 
 
 
 
 
 
 
 	
r&   
page_tokenpage_numberc                     t          j        |||||d          }t          j        ddi          }d|d<   | j                            d| j        ||          }t          | j        |          S )a  
        Retrieve a single page of PolicyInstance records from the API.
        Request is executed immediately

        :param tool_id: The tool ID.
        :param knowledge_id: The knowledge ID.
        :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 PolicyInstance
        ToolIdKnowledgeId	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr7   rF   r>   r5   	r#   r?   r@   rW   rX   rB   datarh   responses	            r%   rF   zPolicyList.page   s    ( y!+'#% 
 
 )^-PQRR.=%%dig & 
 
 $-222r&   c                    K   t          j        |||||d          }t          j        ddi          }d|d<   | j                            d| j        ||           d{V }t          | j        |          S )	a  
        Asynchronously retrieve a single page of PolicyInstance records from the API.
        Request is executed immediately

        :param tool_id: The tool ID.
        :param knowledge_id: The knowledge ID.
        :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 PolicyInstance
        rZ   r_   r`   ra   rb   rc   rd   N)r   ri   r7   rK   r>   r5   rj   s	            r%   rK   zPolicyList.page_async  s      ( y!+'#% 
 
 )^-PQRR.11dig 2 
 
 
 
 
 
 
 
 $-222r&   
target_urlc                 v    | j         j        j                            d|          }t	          | j         |          S )z
        Retrieve a specific page of PolicyInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PolicyInstance
        rc   )r7   domaintwiliorequestr5   r#   rn   rl   s      r%   get_pagezPolicyList.get_page.  s3     ='.66ujII$-222r&   c                    K   | j         j        j                            d|           d{V }t	          | j         |          S )a   
        Asynchronously retrieve a specific page of PolicyInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PolicyInstance
        rc   N)r7   rp   rq   request_asyncr5   rs   s      r%   get_page_asynczPolicyList.get_page_async:  sI       -4BB5*UUUUUUUU$-222r&   c                     dS )r)   z!<Twilio.Assistants.V1.PolicyList>r*   r+   s    r%   r,   zPolicyList.__repr__F  r:   r&   )r-   r.   r/   r   r    r   unsetr   r1   objectr   intr	   r   rG   r
   rL   r   rO   rV   r5   rF   rK   rt   rw   r,   r2   r3   s   @r%   r<   r<   T   s       	  	  	  	  	  	  	  '-l+1<##'; ;sF{#; CK(; }	;
 C=; 
.	!; ; ; ;B '-l+1<##'A AsF{#A CK(A }	A
 C=A 
~	&A A A AB '-l+1<##'
 
sF{#
 CK(
 }	

 C=
 
n	
 
 
 
D '-l+1<##'
 
sF{#
 CK(
 }	

 C=
 
n	
 
 
 
F '-l+1<)/*0,(.%3 %3sF{#%3 CK(%3 #v+&	%3
 3;'%3 f%%3 
%3 %3 %3 %3R '-l+1<)/*0,(.%3 %3sF{#%3 CK(%3 #v+&	%3
 3;'%3 f%%3 
%3 %3 %3 %3N
33 
3: 
3 
3 
3 
3
3s 
3z 
3 
3 
3 
33# 3 3 3 3 3 3 3 3r&   r<   N)r0   r   typingr   r   r   r   r   r	   r
   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r5   r<   r*   r&   r%   <module>r      sM          L L L L L L L L L L L L L L L L L L + + + + + + + + : : : : : : 2 2 2 2 2 2 ' ' ' ' ' ' ! ! ! ! ! !%7 %7 %7 %7 %7% %7 %7 %7P3 3 3 3 3 3 3 3&x3 x3 x3 x3 x3 x3 x3 x3 x3 x3r&   