o
    e>                     @   sh   d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd deZ	G dd	 d	eZ
G d
d deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceResource)ListResource)Pagec                       sj   e Zd Z fddZejddfddZejddfddZejejejejfdd	Zd
d Z	dd Z
  ZS )TemplateListc                    s.   t t| | i | _djdi | j| _dS )z
        Initialize the TemplateList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.verify.v2.template.TemplateList
        :rtype: twilio.rest.verify.v2.template.TemplateList
        z
/TemplatesN )superr   __init__	_solutionformat_uri)selfversion	__class__r   Q/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/verify/v2/template.pyr	      s   	zTemplateList.__init__Nc                 C   s2   | j ||}| j||d d}| j ||d S )a  
        Streams TemplateInstance 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 unicode friendly_name: Filter templates using friendly name
        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.verify.v2.template.TemplateInstance]
        	page_size)friendly_namer   limit)_versionread_limitspagestream)r   r   r   r   limitsr   r   r   r   r       s   zTemplateList.streamc                 C   s   t | j|||dS )a  
        Lists TemplateInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param unicode friendly_name: Filter templates using friendly name
        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.verify.v2.template.TemplateInstance]
        )r   r   r   )listr   )r   r   r   r   r   r   r   r   8   s   zTemplateList.listc                 C   s8   t ||||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of TemplateInstance records from the API.
        Request is executed immediately

        :param unicode friendly_name: Filter templates using friendly name
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of TemplateInstance
        :rtype: twilio.rest.verify.v2.template.TemplatePage
        )FriendlyName	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   TemplatePager
   )r   r   
page_tokenpage_numberr   dataresponser   r   r   r   K   s   zTemplateList.pagec                 C   s"   | j jjd|}t| j || jS )a5  
        Retrieve a specific page of TemplateInstance records from the API.
        Request is executed immediately

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

        :returns: Page of TemplateInstance
        :rtype: twilio.rest.verify.v2.template.TemplatePage
        r   )r   domaintwiliorequestr#   r
   )r   
target_urlr'   r   r   r   get_paged   s
   

zTemplateList.get_pagec                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Verify.V2.TemplateList>r   r   r   r   r   __repr__u      zTemplateList.__repr__)__name__
__module____qualname__r	   r   unsetr   r   r   r,   r0   __classcell__r   r   r   r   r      s    
r   c                       s,   e Zd Z fddZdd Zdd Z  ZS )r#   c                    s   t t| || || _dS )a$  
        Initialize the TemplatePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.verify.v2.template.TemplatePage
        :rtype: twilio.rest.verify.v2.template.TemplatePage
        N)r   r#   r	   r
   )r   r   r'   solutionr   r   r   r	      s   

zTemplatePage.__init__c                 C   s   t | j|S )z
        Build an instance of TemplateInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.verify.v2.template.TemplateInstance
        :rtype: twilio.rest.verify.v2.template.TemplateInstance
        )TemplateInstancer   )r   payloadr   r   r   get_instance   s   	zTemplatePage.get_instancec                 C   r-   )r.   z<Twilio.Verify.V2.TemplatePage>r   r/   r   r   r   r0      r1   zTemplatePage.__repr__)r2   r3   r4   r	   r:   r0   r6   r   r   r   r   r#      s    r#   c                       sT   e Zd Z fddZedd Zedd Zedd Zed	d
 Zdd Z	  Z
S )r8   c                    sH   t t| | |d|d|d|dd| _d| _i | _dS )z
        Initialize the TemplateInstance

        :returns: twilio.rest.verify.v2.template.TemplateInstance
        :rtype: twilio.rest.verify.v2.template.TemplateInstance
        sidaccount_sidr   translations)r;   r<   r   r=   N)r   r8   r	   get_properties_contextr
   )r   r   r9   r   r   r   r	      s   
zTemplateInstance.__init__c                 C   
   | j d S )zc
        :returns: A string that uniquely identifies this Template
        :rtype: unicode
        r;   r?   r/   r   r   r   r;         
zTemplateInstance.sidc                 C   rA   )z?
        :returns: Account Sid
        :rtype: unicode
        r<   rB   r/   r   r   r   r<      rC   zTemplateInstance.account_sidc                 C   rA   )zb
        :returns: A string to describe the verification template
        :rtype: unicode
        r   rB   r/   r   r   r   r      rC   zTemplateInstance.friendly_namec                 C   rA   )zW
        :returns: Object with the template translations.
        :rtype: dict
        r=   rB   r/   r   r   r   r=      rC   zTemplateInstance.translationsc                 C   r-   )r.   z#<Twilio.Verify.V2.TemplateInstance>r   r/   r   r   r   r0      r1   zTemplateInstance.__repr__)r2   r3   r4   r	   propertyr;   r<   r   r=   r0   r6   r   r   r   r   r8      s    



r8   N)__doc__twilio.baser   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r#   r8   r   r   r   r   <module>   s   p&