
    U}bg4                         d Z ddlmZmZmZ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 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dS )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.
    )AnyDictListOptionalUnionIteratorAsyncIterator)values)InstanceContext)InstanceResource)ListResource)Version)Pagec                        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d
ZddZdefdZ xZS )PoliciesInstanceao  
    :ivar sid: The unique string that identifies the Policy resource.
    :ivar friendly_name: A human-readable description that is assigned to describe the Policy resource. Examples can include Primary Customer profile policy
    :ivar requirements: The SID of an object that holds the policy information
    :ivar url: The absolute URL of the Policy resource.
    Nversionpayloadsidc                 H   t                                          |           |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        d|p| j        i| _        d | _        d S )Nr   friendly_namerequirementsurl)	super__init__getr   r   r   r   	_solution_context)selfr   r   r   	__class__s       s/home/e360mart.nyusoft.in/public_html/e360mart_env/lib/python3.11/site-packages/twilio/rest/trusthub/v1/policies.pyr   zPoliciesInstance.__init__    s     	!!!")++e"4"4,3KK,H,H9@^9T9T")++e"4"4 3?$(
 48    returnPoliciesContextc                 j    | 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: PoliciesContext for this PoliciesInstance
        Nr   r   )r   r#   _versionr   r   s    r    _proxyzPoliciesInstance._proxy/   s;     = +N5)  DM }r!   c                 4    | j                                         S )]
        Fetch the PoliciesInstance


        :returns: The fetched PoliciesInstance
        )r(   fetchr'   s    r    r+   zPoliciesInstance.fetch>   s     {  """r!   c                 D   K   | j                                          d{V S )w
        Asynchronous coroutine to fetch the PoliciesInstance


        :returns: The fetched PoliciesInstance
        N)r(   fetch_asyncr'   s    r    r.   zPoliciesInstance.fetch_asyncG   s.       [,,.........r!   c                     d                     d | j                                        D                       }d                    |          S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   H   K   | ]\  }}d                      ||          V  dS z{}={}Nformat.0kvs      r    	<genexpr>z,PoliciesInstance.__repr__.<locals>.<genexpr>V   4      SSDAq7>>!Q//SSSSSSr!   z(<Twilio.Trusthub.V1.PoliciesInstance {}>joinr   itemsr5   r   contexts     r    __repr__zPoliciesInstance.__repr__P   sF     ((SSDN<P<P<R<RSSSSS9@@IIIr!   N)r"   r#   )r"   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr(   r+   r.   rA   __classcell__r   s   @r    r   r      s          OS8 88)-c3h8>Fsm8 8 8 8 8 8    X# # # #/ / / /J# J J J J J J J Jr!   r   c                   L     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	 xZ
S )r#   r   r   c                     t                                          |           d|i| _         dj        di | j        | _        dS )z
        Initialize the PoliciesContext

        :param version: Version that contains the resource
        :param sid: The unique string that identifies the Policy resource.
        r   z/Policies/{sid}N )r   r   r   r5   _uri)r   r   r   r   s      r    r   zPoliciesContext.__init__\   sP     	!!! 3
 -%,>>t~>>			r!   r"   c                     | j                             d| j                  }t          | j         || j        d                   S )r*   GETmethodurir   r%   )r&   r+   rN   r   r   r   r   s     r    r+   zPoliciesContext.fetchk   sS     -%%	 & 
 

  Mu%
 
 
 	
r!   c                    K   | j                             d| j                   d{V }t          | j         || j        d                   S )r-   rP   rQ   Nr   r%   )r&   r.   rN   r   r   rT   s     r    r.   zPoliciesContext.fetch_async~   su       11	 2 
 
 
 
 
 
 
 

  Mu%
 
 
 	
r!   c                     d                     d | j                                        D                       }d                    |          S )r0   r1   c              3   H   K   | ]\  }}d                      ||          V  dS r3   r4   r6   s      r    r:   z+PoliciesContext.__repr__.<locals>.<genexpr>   r;   r!   z'<Twilio.Trusthub.V1.PoliciesContext {}>r<   r?   s     r    rA   zPoliciesContext.__repr__   sF     ((SSDN<P<P<R<RSSSSS8??HHHr!   )rC   rD   rE   r   rG   r   r   r+   r.   rA   rI   rJ   s   @r    r#   r#   Z   s        ? ?c ? ? ? ? ? ?
' 
 
 
 
&
#3 
 
 
 
&I# I I I I I I I Ir!   r#   c                   :    e Zd Zdeeef         defdZdefdZdS )PoliciesPager   r"   c                 ,    t          | j        |          S )zn
        Build an instance of PoliciesInstance

        :param payload: Payload response from the API
        )r   r&   rT   s     r    get_instancezPoliciesPage.get_instance   s      w777r!   c                     dS )r0   z!<Twilio.Trusthub.V1.PoliciesPage>rM   r'   s    r    rA   zPoliciesPage.__repr__   
     32r!   N)	rC   rD   rE   r   rG   r   r   r[   rA   rM   r!   r    rY   rY      sZ        8DcN 87G 8 8 8 83# 3 3 3 3 3 3r!   rY   c            	       D    e Zd Zdef 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 )PoliciesListr   c                 X    t                                          |           d| _        dS )zj
        Initialize the PoliciesList

        :param version: Version that contains the resource

        z	/PoliciesN)r   r   rN   )r   r   r   s     r    r   zPoliciesList.__init__   s(     	!!!			r!   Nlimit	page_sizer"   c                     | j                             ||          }|                     |d                   }| j                             ||d                   S )a^  
        Streams PoliciesInstance 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
        rb   rb   ra   )r&   read_limitspagestreamr   ra   rb   limitsrf   s        r    rg   zPoliciesList.stream   sO    ( **5)<<yy6+#6y77}##D&/:::r!   c                    K   | j                             ||          }|                     |d                    d{V }| j                             ||d                   S )am  
        Asynchronously streams PoliciesInstance 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
        rb   rd   Nra   )r&   re   
page_asyncstream_asyncrh   s        r    rl   zPoliciesList.stream_async   se      ( **5)<<__vk/B_CCCCCCCC}))$w@@@r!   c                 J    t          |                     ||                    S )a  
        Lists PoliciesInstance 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
        ra   rb   )listrg   r   ra   rb   s      r    ro   zPoliciesList.list   s2    & KK#   
 
 	
r!   c                 `   K   d |                      ||           d{V 2              d{V S )a
  
        Asynchronously lists PoliciesInstance 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
        c                 $   K   g | 3 d {V 	 }|6 S rB   rM   )r7   records     r    
<listcomp>z+PoliciesList.list_async.<locals>.<listcomp>  sO       
 
 
 
 
 
 
 
 
 
 
 
 
s   rn   N)rl   rp   s      r    
list_asynczPoliciesList.list_async  s~      &
 
&*&7&7# '8 ' ' ! ! ! ! ! !
 
 
 
 
 
 
 
 
 	
r!   
page_tokenpage_numberc                     t          j        |||d          }| j                            d| j        |          }t          | j        |          S )au  
        Retrieve a single page of PoliciesInstance 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 PoliciesInstance
        	PageTokenr   PageSizerP   rR   rS   params)r
   ofr&   rf   rN   rY   r   rv   rw   rb   dataresponses         r    rf   zPoliciesList.page"  sZ      y'#% 
 
 =%%U	$%OODM8444r!   c                    K   t          j        |||d          }| j                            d| j        |           d{V }t          | j        |          S )a  
        Asynchronously retrieve a single page of PoliciesInstance 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 PoliciesInstance
        ry   rP   r|   N)r
   r~   r&   rk   rN   rY   r   s         r    rk   zPoliciesList.page_async=  s        y'#% 
 
 11di 2 
 
 
 
 
 
 
 
 DM8444r!   
target_urlc                 v    | j         j        j                            d|          }t	          | j         |          S )z
        Retrieve a specific page of PoliciesInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PoliciesInstance
        rP   )r&   domaintwiliorequestrY   r   r   r   s      r    get_pagezPoliciesList.get_pageZ  s3     ='.66ujIIDM8444r!   c                    K   | j         j        j                            d|           d{V }t	          | j         |          S )a  
        Asynchronously retrieve a specific page of PoliciesInstance records from the API.
        Request is executed immediately

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

        :returns: Page of PoliciesInstance
        rP   N)r&   r   r   request_asyncrY   r   s      r    get_page_asynczPoliciesList.get_page_asyncf  sI       -4BB5*UUUUUUUUDM8444r!   r   c                 .    t          | j        |          S zz
        Constructs a PoliciesContext

        :param sid: The unique string that identifies the Policy resource.
        r%   r#   r&   r   r   s     r    r   zPoliciesList.getr       t}#6666r!   c                 .    t          | j        |          S r   r   r   s     r    __call__zPoliciesList.__call__z  r   r!   c                     dS )r0   z!<Twilio.Trusthub.V1.PoliciesList>rM   r'   s    r    rA   zPoliciesList.__repr__  r]   r!   )NN)rC   rD   rE   r   r   r   intr   r   rg   r	   rl   r   ro   ru   r
   unsetr   rG   objectrY   rf   rk   r   r   r#   r   r   rA   rI   rJ   s   @r    r_   r_      s       	  	  	  	  	  	  	   $#'; ;}; C=; 
"	#	; ; ; ;6  $#'A A}A C=A 
'	(	A A A A6  $#'
 
}
 C=
 
		
 
 
 
8  $#'
 
}
 C=
 
		
 
 
 
: *0*0,(.	5 5#v+&5 3;'5 f%	5
 
5 5 5 5: *0*0,(.	5 5#v+&5 3;'5 f%	5
 
5 5 5 5:
53 
5< 
5 
5 
5 
5
5s 
5| 
5 
5 
5 
57s 7 7 7 7 77C 7O 7 7 7 73# 3 3 3 3 3 3 3 3r!   r_   N)rF   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r#   rY   r_   rM   r!   r    <module>r      s    M L L L L L L L L L L L L L L L L L       8 8 8 8 8 8 : : : : : : 2 2 2 2 2 2 ' ' ' ' ' ' ! ! ! ! ! !?J ?J ?J ?J ?J' ?J ?J ?JD>I >I >I >I >Io >I >I >IB3 3 3 3 34 3 3 3&Z3 Z3 Z3 Z3 Z3< Z3 Z3 Z3 Z3 Z3r!   