
    d{iT                         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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)ApiResponse)InstanceResource)ListResource)Version)Pagec                   B     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                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        t        j                  |j                  d            | _        t        j                  |j                  d	            | _        y )
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      ^/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/assistants/v1/policy.pyr!   zPolicyInstance.__init__'   s    !!(T!2#*;;v#6	*1++m*D*1++m*D'.{{:'>#*;;v#6	;B;;GW;X0;0L0LKK'1
 1<0L0LKK'1
    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z%<Twilio.Assistants.V1.PolicyInstance> r$   s    r&   __repr__zPolicyInstance.__repr__8   s     7r'   )__name__
__module____qualname____doc__r   r   strr   r!   r-   __classcell__r%   s   @r&   r   r      s/    

 
$sCx. 
"7# 7r'   r   c                   2    e Zd Zdeeef   defdZdefdZy)
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_instanceD   s     dmmW55r'   c                      y)r*   z!<Twilio.Assistants.V1.PolicyPage>r+   r,   s    r&   r-   zPolicyPage.__repr__L        3r'   N)	r.   r/   r0   r   r2   r   r   r9   r-   r+   r'   r&   r6   r6   B   s)    6DcN 6~ 63# 3r'   r6   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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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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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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                 2    t         |   |       d| _        y)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__W   s     	!	r'   Ntool_idknowledge_idlimit	page_sizer(   c                     | j                   j                  ||      }| j                  |||d         }| j                   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
        rC   r@   rA   rC   rB   )r8   read_limitspagestreamr$   r@   rA   rB   rC   limitsrG   s          r&   rH   zPolicyList.streamb   sV    0 **5)<yy,&BU  
 }}##D&/::r'   c                    K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  ||d         S 7 #w)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
        rC   rE   NrB   )r8   rF   
page_asyncstream_asyncrI   s          r&   rM   zPolicyList.stream_async   sd     0 **5)<__,&BU % 
 
 }}))$w@@	
s   7AA$Ac                     | j                   j                  ||      }| j                  |||d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams PolicyInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rC   rE   rB   )r8   rF   page_with_http_inforH   datastatus_codeheadersr$   r@   rA   rB   rC   rJ   page_response	generators           r&   stream_with_http_infoz PolicyList.stream_with_http_info   sv    , **5)<00,&BU 1 
 MM((););VG_M	=44m6K6KLLr'   c                   K   | j                   j                  ||      }| j                  |||d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams PolicyInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        rC   rE   NrB   )r8   rF   page_with_http_info_asyncrM   rP   rQ   rR   rS   s           r&   stream_with_http_info_asyncz&PolicyList.stream_with_http_info_async   s     , **5)<"<<,&BU = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   7BB ABc                 >    t        | j                  ||||            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@   rA   rB   rC   )listrH   )r$   r@   rA   rB   rC   s        r&   r\   zPolicyList.list   s.    . KK)#	  
 	
r'   c                 ~   K   | j                  ||||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)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
        r[   N)rM   )r$   r@   rA   rB   rC   records         r&   
list_asynczPolicyList.list_async   sZ     2 '+&7&7)#	 '8 ' !
 
 !
 
 	
 
s0   =0=842
48=48=c                 f    | j                  ||||      \  }}}t        |      }t        |||      S )a  
        Lists PolicyInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r[   rP   rQ   rR   )rV   r\   r   )	r$   r@   rA   rB   rC   rU   rQ   rR   itemss	            r&   list_with_http_infozPolicyList.list_with_http_info  sG    , +/*D*D%	 +E +
'	; Y;PPr'   c                    K   | j                  ||||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }	}t        |	||      S w)a  
        Asynchronously lists PolicyInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r[   Nra   )rY   r   )
r$   r@   rA   rB   rC   rU   rQ   rR   r^   rb   s
             r&   list_with_http_info_asyncz$PolicyList.list_with_http_info_async<  sl     , 150P0P%	 1Q 1
 +
'	; -666&+
 7666;PPs4   A6A<:8
:<A:<A
page_tokenpage_numberc                     t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  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paramsrR   )r   ofr8   rG   r?   r6   	r$   r@   rA   rf   rg   rC   rP   rR   responses	            r&   rG   zPolicyList.page[  s    ( yy!+'#%
 ))^-PQR.==%%diig & 
 $--22r'   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 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
        ri   rn   ro   rp   rq   rr   rs   N)r   rw   r8   rL   r?   r6   rx   s	            r&   rL   zPolicyList.page_async  s     ( yy!+'#%
 ))^-PQR.11diig 2 
 
 $--22
s   A$B&B'Bc                    t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}	}
t        | j                  |      }t        ||	|
      S )	a  
        Retrieve a single page with response metadata


        :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: ApiResponse with PolicyPage, status code, and headers
        ri   rn   ro   rp   rq   rr   rs   ra   )r   rw   r8   page_with_response_infor?   r6   r   r$   r@   rA   rf   rg   rC   rP   rR   ry   rQ   response_headersrG   s               r&   rO   zPolicyList.page_with_http_info  s    ( yy!+'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ $--2+GWXXr'   c                 .  K   t        j                  |||||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}	}
t        | j                  |      }t        ||	|
	      S 7 ,w)
a  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with PolicyPage, status code, and headers
        ri   rn   ro   rp   rq   rr   rs   Nra   )r   rw   r8   page_with_response_info_asyncr?   r6   r   r}   s               r&   rX   z$PolicyList.page_with_http_info_async  s     ( yy!+'#%
 ))^-PQR. --==$))D' >   	0+/
 $--2+GWXXs   A$B&B'-B
target_urlc                     | j                   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
        rr   )r8   domaintwiliorequestr6   r$   r   ry   s      r&   get_pagezPolicyList.get_page  s7     ==''..66ujI$--22r'   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)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
        rr   N)r8   r   r   request_asyncr6   r   s      r&   get_page_asynczPolicyList.get_page_async  sD      --44BB5*UU$--22 Vs   4AAAc                      y)r*   z!<Twilio.Assistants.V1.PolicyList>r+   r,   s    r&   r-   zPolicyList.__repr__  r;   r'   )#r.   r/   r0   r   r!   r   unsetr   r2   objectr   intr	   r   rH   r
   rM   tuplerV   rY   r   r\   r_   r   rc   re   r6   rG   rL   rO   rX   r   r   r-   r3   r4   s   @r&   r=   r=   U   s   	  	  '-ll+1<<##';sF{#; CK(; }	;
 C=; 
.	!;B '-ll+1<<##'AsF{#A CK(A }	A
 C=A 
~	&AB '-ll+1<<##'MsF{#M CK(M }	M
 C=M 
M@ '-ll+1<<##'MsF{#M CK(M }	M
 C=M 
M@ '-ll+1<<##'
sF{#
 CK(
 }	

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

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