o
    �¨ÊhÛ  ã                   @   s„   d 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„ deƒ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)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                       s8   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Z‡  ZS )
ÚFormListúÉ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                    s   t t| ƒ |¡ i | _dS )zÖ
        Initialize the FormList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.authy.v1.form.FormList
        :rtype: twilio.rest.authy.v1.form.FormList
        N)Úsuperr   Ú__init__Ú	_solution)ÚselfÚversion©Ú	__class__© úK/var/www/html/env/lib/python3.10/site-packages/twilio/rest/authy/v1/form.pyr
      s   	
zFormList.__init__c                 C   ó   t | j|d�S ©zÏ
        Constructs a FormContext

        :param form_type: The Form Type of this Form

        :returns: twilio.rest.authy.v1.form.FormContext
        :rtype: twilio.rest.authy.v1.form.FormContext
        ©Ú	form_type©ÚFormContextÚ_version©r   r   r   r   r   Úget#   ó   	zFormList.getc                 C   r   r   r   r   r   r   r   Ú__call__.   r   zFormList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Authy.V1.FormList>r   ©r   r   r   r   Ú__repr__9   ó   zFormList.__repr__)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r    Ú__classcell__r   r   r   r   r      s    r   c                       ó0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )ÚFormPager   c                    s   t t| ƒ ||¡ || _dS )a  
        Initialize the FormPage

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

        :returns: twilio.rest.authy.v1.form.FormPage
        :rtype: twilio.rest.authy.v1.form.FormPage
        N)r	   r(   r
   r   )r   r   ÚresponseÚsolutionr   r   r   r
   H   s   

zFormPage.__init__c                 C   s   t | j|ƒS )zà
        Build an instance of FormInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.authy.v1.form.FormInstance
        :rtype: twilio.rest.authy.v1.form.FormInstance
        )ÚFormInstancer   )r   Úpayloadr   r   r   Úget_instanceW   s   	zFormPage.get_instancec                 C   r   )r   z<Twilio.Authy.V1.FormPage>r   r   r   r   r   r    b   r!   zFormPage.__repr__)r"   r#   r$   r%   r
   r-   r    r&   r   r   r   r   r(   C   s
    r(   c                       r'   )r   r   c                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )a  
        Initialize the FormContext

        :param Version version: Version that contains the resource
        :param form_type: The Form Type of this Form

        :returns: twilio.rest.authy.v1.form.FormContext
        :rtype: twilio.rest.authy.v1.form.FormContext
        r   z/Forms/{form_type}Nr   )r	   r   r
   r   ÚformatÚ_uri)r   r   r   r   r   r   r
   q   s   

zFormContext.__init__c                 C   s4   t  i ¡}| jjd| j|d�}t| j|| jd d�S )ú…
        Fetch a FormInstance

        :returns: Fetched FormInstance
        :rtype: twilio.rest.authy.v1.form.FormInstance
        ÚGET)Úparamsr   r   )r   Úofr   Úfetchr/   r+   r   )r   r2   r,   r   r   r   r4   �   s   
ýzFormContext.fetchc                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )r   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r.   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>™   ó   € z'FormContext.__repr__.<locals>.<genexpr>z <Twilio.Authy.V1.FormContext {}>©Újoinr   Úitemsr.   ©r   Úcontextr   r   r   r    ’   ó   
zFormContext.__repr__)r"   r#   r$   r%   r
   r4   r    r&   r   r   r   r   r   l   s
    r   c                       s~   e Zd ZdZG dd„ deƒZd‡ fdd„	Zedd„ ƒZed	d
„ ƒZ	edd„ ƒZ
edd„ ƒZedd„ ƒZdd„ Zdd„ Z‡  ZS )r+   r   c                   @   s   e Zd ZdZdZdZdS )zFormInstance.FormTypezform-app-pushzform-smsz	form-totpN)r"   r#   r$   ÚFORM_APP_PUSHÚFORM_SMSÚ	FORM_TOTPr   r   r   r   ÚFormType¢   s    rI   Nc                    sN   t t| ƒ |¡ |d |d |d |d dœ| _d| _d|p"| jd i| _dS )zž
        Initialize the FormInstance

        :returns: twilio.rest.authy.v1.form.FormInstance
        :rtype: twilio.rest.authy.v1.form.FormInstance
        r   ÚformsÚ	form_metaÚurl)r   rJ   rK   rL   N)r	   r+   r
   Ú_propertiesÚ_contextr   )r   r   r,   r   r   r   r   r
   §   s   üzFormInstance.__init__c                 C   s&   | j du rt| j| jd d�| _ | j S )a  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: FormContext for this FormInstance
        :rtype: twilio.rest.authy.v1.form.FormContext
        Nr   r   )rN   r   r   r   r   r   r   r   Ú_proxy¼   s   
	zFormInstance._proxyc                 C   ó
   | j d S )z\
        :returns: The Form Type of this Form
        :rtype: FormInstance.FormType
        r   ©rM   r   r   r   r   r   É   ó   
zFormInstance.form_typec                 C   rP   )zm
        :returns: Object that contains the available forms for this form type.
        :rtype: dict
        rJ   rQ   r   r   r   r   rJ   Ñ   rR   zFormInstance.formsc                 C   rP   )zs
        :returns: Additional information for the available forms for this form type.
        :rtype: dict
        rK   rQ   r   r   r   r   rK   Ù   rR   zFormInstance.form_metac                 C   rP   )zc
        :returns: The URL to access the forms for this form type.
        :rtype: unicode
        rL   rQ   r   r   r   r   rL   á   rR   zFormInstance.urlc                 C   s
   | j  ¡ S )r0   )rO   r4   r   r   r   r   r4   é   s   
zFormInstance.fetchc                 C   r5   )r   r6   c                 s   r7   r8   r9   r:   r   r   r   r>   ù   r?   z(FormInstance.__repr__.<locals>.<genexpr>z!<Twilio.Authy.V1.FormInstance {}>r@   rC   r   r   r   r    ò   rE   zFormInstance.__repr__)N)r"   r#   r$   r%   ÚobjectrI   r
   ÚpropertyrO   r   rJ   rK   rL   r4   r    r&   r   r   r   r   r+   �   s     




	r+   N)r%   Útwilio.baser   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r(   r   r+   r   r   r   r   Ú<module>   s   3)1