o
    O`7                     @   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 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
      /       /
    )deserialize)	serialize)values)InstanceContext)InstanceResource)ListResource)Pagec                       s   e Zd Z fddZejejejddfddZejejejddfddZejejejejejejfdd	Zd
d Z	dd Z
dd Zdd Z  ZS )VerificationAttemptListc                    s.   t t| | i | _djdi | j| _dS )a%  
        Initialize the VerificationAttemptList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.verify.v2.verification_attempt.VerificationAttemptList
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptList
        z	/AttemptsN )superr	   __init__	_solutionformat_uri)selfversion	__class__r
   n/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/twilio/rest/verify/v2/verification_attempt.pyr      s   	z VerificationAttemptList.__init__Nc                 C   s6   | j ||}| j||||d d}| j ||d S )a  
        Streams VerificationAttemptInstance 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 datetime date_created_after: Filter verification attempts after this date
        :param datetime date_created_before: Filter verification attempts befor this date
        :param unicode channel_data_to: Destination of a verification
        :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.verification_attempt.VerificationAttemptInstance]
        	page_size)date_created_afterdate_created_beforechannel_data_tor   limit)_versionread_limitspagestream)r   r   r   r   r   r   limitsr   r
   r
   r   r   #   s   zVerificationAttemptList.streamc                 C   s   t | j|||||dS )aw  
        Lists VerificationAttemptInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param datetime date_created_after: Filter verification attempts after this date
        :param datetime date_created_before: Filter verification attempts befor this date
        :param unicode channel_data_to: Destination of a verification
        :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.verification_attempt.VerificationAttemptInstance]
        )r   r   r   r   r   )listr   )r   r   r   r   r   r   r
   r
   r   r   D   s   zVerificationAttemptList.listc           	   	   C   sH   t t|t|||||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of VerificationAttemptInstance records from the API.
        Request is executed immediately

        :param datetime date_created_after: Filter verification attempts after this date
        :param datetime date_created_before: Filter verification attempts befor this date
        :param unicode channel_data_to: Destination of a verification
        :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 VerificationAttemptInstance
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptPage
        )DateCreatedAfterDateCreatedBeforezChannelData.To	PageTokenr   PageSizeGET)methoduriparams)	r   ofr   iso8601_datetimer   r   r   VerificationAttemptPager   )	r   r   r   r   
page_tokenpage_numberr   dataresponser
   r
   r   r   a   s   	zVerificationAttemptList.pagec                 C   s"   | j jjd|}t| j || jS )ab  
        Retrieve a specific page of VerificationAttemptInstance records from the API.
        Request is executed immediately

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

        :returns: Page of VerificationAttemptInstance
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptPage
        r$   )r   domaintwiliorequestr*   r   )r   
target_urlr.   r
   r
   r   get_page   s
   

z VerificationAttemptList.get_pagec                 C      t | j|dS a  
        Constructs a VerificationAttemptContext

        :param sid: Verification Attempt Sid.

        :returns: twilio.rest.verify.v2.verification_attempt.VerificationAttemptContext
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptContext
        sidVerificationAttemptContextr   r   r7   r
   r
   r   get      	zVerificationAttemptList.getc                 C   r4   r5   r8   r:   r
   r
   r   __call__   r<   z VerificationAttemptList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z*<Twilio.Verify.V2.VerificationAttemptList>r
   r   r
   r
   r   __repr__      z VerificationAttemptList.__repr__)__name__
__module____qualname__r   r   unsetr   r   r   r3   r;   r=   rA   __classcell__r
   r
   r   r   r	      s&    
!

r	   c                       ,   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 VerificationAttemptPage

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

        :returns: twilio.rest.verify.v2.verification_attempt.VerificationAttemptPage
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptPage
        N)r   r*   r   r   )r   r   r.   solutionr   r
   r   r      s   

z VerificationAttemptPage.__init__c                 C   s   t | j|S )a/  
        Build an instance of VerificationAttemptInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.verify.v2.verification_attempt.VerificationAttemptInstance
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptInstance
        )VerificationAttemptInstancer   r   payloadr
   r
   r   get_instance   s   	z$VerificationAttemptPage.get_instancec                 C   r>   )r?   z*<Twilio.Verify.V2.VerificationAttemptPage>r
   r@   r
   r
   r   rA      rB   z VerificationAttemptPage.__repr__)rC   rD   rE   r   rM   rA   rG   r
   r
   r   r   r*      s    r*   c                       rH   )r9   c                    s2   t t| | d|i| _djdi | j| _dS )a\  
        Initialize the VerificationAttemptContext

        :param Version version: Version that contains the resource
        :param sid: Verification Attempt Sid.

        :returns: twilio.rest.verify.v2.verification_attempt.VerificationAttemptContext
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptContext
        r7   z/Attempts/{sid}Nr
   )r   r9   r   r   r   r   )r   r   r7   r   r
   r   r      s   

z#VerificationAttemptContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the VerificationAttemptInstance

        :returns: The fetched VerificationAttemptInstance
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptInstance
        r$   )r%   r&   r7   r6   )r   fetchr   rJ   r   rK   r
   r
   r   rO      s   z VerificationAttemptContext.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>       z6VerificationAttemptContext.__repr__.<locals>.<genexpr>z0<Twilio.Verify.V2.VerificationAttemptContext {}>joinr   itemsr   r   contextr
   r
   r   rA         
z#VerificationAttemptContext.__repr__)rC   rD   rE   r   rO   rA   rG   r
   r
   r   r   r9      s    r9   c                       s   e Zd ZG dd de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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 )!rJ   c                   @   s   e Zd ZdZdZdZdS )z$VerificationAttemptInstance.ChannelssmscallemailN)rC   rD   rE   SMSCALLEMAILr
   r
   r
   r   Channels  s    rg   c                   @   s   e Zd ZdZdZdS )z,VerificationAttemptInstance.ConversionStatus	convertedunconvertedN)rC   rD   rE   	CONVERTEDUNCONVERTEDr
   r
   r
   r   ConversionStatus  s    rl   Nc                    s   t t| | |d|d|dt|dt|d|d|d|d|d	d
	| _d| _d|p@| jd i| _dS )z
        Initialize the VerificationAttemptInstance

        :returns: twilio.rest.verify.v2.verification_attempt.VerificationAttemptInstance
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptInstance
        r7   account_sidservice_siddate_createddate_updatedconversion_statuschannelchannel_dataurl)	r7   rm   rn   ro   rp   rq   rr   rs   rt   N)	r   rJ   r   r;   r   r)   _properties_contextr   )r   r   rL   r7   r   r
   r   r   
  s   z$VerificationAttemptInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )aX  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: VerificationAttemptContext for this VerificationAttemptInstance
        :rtype: twilio.rest.verify.v2.verification_attempt.VerificationAttemptContext
        Nr7   r6   )rv   r9   r   r   r@   r
   r
   r   _proxy$  s   
	z"VerificationAttemptInstance._proxyc                 C   
   | j d S )zo
        :returns: A string that uniquely identifies this Verification Attempt
        :rtype: unicode
        r7   ru   r@   r
   r
   r   r7   1     
zVerificationAttemptInstance.sidc                 C   rx   )z?
        :returns: Account Sid
        :rtype: unicode
        rm   ry   r@   r
   r
   r   rm   9  rz   z'VerificationAttemptInstance.account_sidc                 C   rx   )zC
        :returns: The service_sid
        :rtype: unicode
        rn   ry   r@   r
   r
   r   rn   A  rz   z'VerificationAttemptInstance.service_sidc                 C   rx   )zV
        :returns: The date this Attempt was created
        :rtype: datetime
        ro   ry   r@   r
   r
   r   ro   I  rz   z(VerificationAttemptInstance.date_createdc                 C   rx   )zV
        :returns: The date this Attempt was updated
        :rtype: datetime
        rp   ry   r@   r
   r
   r   rp   Q  rz   z(VerificationAttemptInstance.date_updatedc                 C   rx   )zo
        :returns: Status of a conversion
        :rtype: VerificationAttemptInstance.ConversionStatus
        rq   ry   r@   r
   r
   r   rq   Y  rz   z-VerificationAttemptInstance.conversion_statusc                 C   rx   )zm
        :returns: Channel used for the attempt
        :rtype: VerificationAttemptInstance.Channels
        rr   ry   r@   r
   r
   r   rr   a  rz   z#VerificationAttemptInstance.channelc                 C   rx   )zc
        :returns: Object with the channel information for an attempt
        :rtype: dict
        rs   ry   r@   r
   r
   r   rs   i  rz   z(VerificationAttemptInstance.channel_datac                 C   rx   )z;
        :returns: The url
        :rtype: unicode
        rt   ry   r@   r
   r
   r   rt   q  rz   zVerificationAttemptInstance.urlc                 C   s
   | j  S )rN   )rw   rO   r@   r
   r
   r   rO   y  s   
z!VerificationAttemptInstance.fetchc                 C   rP   )r?   rQ   c                 s   rR   rS   rT   rU   r
   r
   r   rY     rZ   z7VerificationAttemptInstance.__repr__.<locals>.<genexpr>z1<Twilio.Verify.V2.VerificationAttemptInstance {}>r[   r^   r
   r
   r   rA     r`   z$VerificationAttemptInstance.__repr__)N)rC   rD   rE   objectrg   rl   r   propertyrw   r7   rm   rn   ro   rp   rq   rr   rs   rt   rO   rA   rG   r
   r
   r   r   rJ      s4    









	rJ   N)__doc__twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r	   r*   r9   rJ   r
   r
   r
   r   <module>   s     &(