U
    ^g%i*                     @   s   d Z ddlmZ ddl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 G d	d
 d
eZG dd de
ZG dd deZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Verify
    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Optional)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       s~   e Zd ZG dd deZeeeef ed fddZ	e
dddd	Zed d
ddZed d
ddZedddZ  ZS )NewChallengeInstancec                   @   s.   e Zd ZdZeeef dddZdd ZdS )z3NewChallengeInstance.CreatePasskeysChallengeRequest;
        :ivar identity:
        :ivar factor_sid:
        payloadc                 C   s   | d| _| d| _d S Nidentity
factor_sidgetr   r   selfr    r   j/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/verify/v2/service/new_challenge.py__init__    s    z<NewChallengeInstance.CreatePasskeysChallengeRequest.__init__c                 C   s   | j | jdS Nr   r   r   r   r   r   r   to_dict%   s    z;NewChallengeInstance.CreatePasskeysChallengeRequest.to_dictN	__name__
__module____qualname____doc__r   strr   r   r   r   r   r   r   CreatePasskeysChallengeRequest   s   r$   )versionr   service_sidc                    s  t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	t
|d| _t
|d	| _t
|d
| _t
|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _d|i| _d | _d S )Noptionssidaccount_sidr&   
entity_sidr   r   date_createddate_updateddate_respondedexpiration_datestatusresponded_reasondetailshidden_detailsmetadatafactor_typeurllinks)superr   r   r'   r(   r)   r&   r*   r   r   r   Ziso8601_datetimer+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   	_solution_context)r   r%   r   r&   	__class__r   r   r   A   s@     zNewChallengeInstance.__init__NewChallengeContextreturnc                 C   s&   | j dkr t| j| jd 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: NewChallengeContext for this NewChallengeInstance
        Nr&   r&   )r9   r<   _versionr8   r   r   r   r   _proxye   s    
zNewChallengeInstance._proxy!create_passkeys_challenge_requestr>   c                 C   s   | j |S )
        Create the NewChallengeInstance

        :param create_passkeys_challenge_request:

        :returns: The created NewChallengeInstance
        )rA   creater   rC   r   r   r   rE   t   s    
zNewChallengeInstance.createc                    s   | j |I dH S )
        Asynchronous coroutine to create the NewChallengeInstance

        :param create_passkeys_challenge_request:

        :returns: The created NewChallengeInstance
        N)rA   create_asyncrF   r   r   r   rH      s    
z!NewChallengeInstance.create_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>   s     z0NewChallengeInstance.__repr__.<locals>.<genexpr>z*<Twilio.Verify.V2.NewChallengeInstance {}>joinr8   itemsrM   r   contextr   r   r   __repr__   s    zNewChallengeInstance.__repr__)r   r    r!   objectr$   r   r   r#   r   r   propertyrA   rE   rH   rX   __classcell__r   r   r:   r   r      s   '$r   c                       sb   e Zd ZG dd deZeed fddZeedddZ	eedd	d
Z
edddZ  ZS )r<   c                   @   s.   e Zd ZdZeeef dddZdd ZdS )z2NewChallengeContext.CreatePasskeysChallengeRequestr   r   c                 C   s   | d| _| d| _d S r   r   r   r   r   r   r      s    z;NewChallengeContext.CreatePasskeysChallengeRequest.__init__c                 C   s   | j | jdS r   r   r   r   r   r   r      s    z:NewChallengeContext.CreatePasskeysChallengeRequest.to_dictNr   r   r   r   r   r$      s   r$   r%   r&   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the NewChallengeContext

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.
        r&   z+/Services/{service_sid}/Passkeys/ChallengesN)r7   r   r8   rM   _urir   r%   r&   r:   r   r   r      s     zNewChallengeContext.__init__rB   c                 C   sN   |  }ti }d|d< d|d< | jjd| j||d}t| j|| jd dS )rD   application/jsonContent-TypeAcceptPOSTmethoduridataheadersr&   r?   )r   r   ofr@   rE   r]   r   r8   r   rC   rf   rg   r   r   r   r   rE      s    

     zNewChallengeContext.createc                    sT   |  }ti }d|d< d|d< | jjd| j||dI dH }t| j|| jd dS )	rG   r_   r`   ra   rb   rc   Nr&   r?   )r   r   rh   r@   rH   r]   r   r8   ri   r   r   r   rH      s    

     z NewChallengeContext.create_asyncr=   c                 C   s$   d dd | j D }d|S )rI   rJ   c                 s   s   | ]\}}d  ||V  qdS rK   rL   rN   r   r   r   rR      s     z/NewChallengeContext.__repr__.<locals>.<genexpr>z)<Twilio.Verify.V2.NewChallengeContext {}>rS   rV   r   r   r   rX      s    zNewChallengeContext.__repr__)r   r    r!   rY   r$   r   r#   r   r   rE   rH   rX   r[   r   r   r:   r   r<      s   r<   c                       s^   e Zd ZG dd deZeed fddZedddZ	edd	d
Z
edddZ  ZS )NewChallengeListc                   @   s.   e Zd ZdZeeef dddZdd ZdS )z/NewChallengeList.CreatePasskeysChallengeRequestr   r   c                 C   s   | d| _| d| _d S r   r   r   r   r   r   r     s    z8NewChallengeList.CreatePasskeysChallengeRequest.__init__c                 C   s   | j | jdS r   r   r   r   r   r   r   	  s    z7NewChallengeList.CreatePasskeysChallengeRequest.to_dictNr   r   r   r   r   r$      s   r$   r\   c                    s   t  | d|i| _dS )z
        Initialize the NewChallengeList

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.

        r&   N)r7   r   r8   r^   r:   r   r   r     s     zNewChallengeList.__init__r=   c                 C   s   t | j| jd dS z3
        Constructs a NewChallengeContext

        r&   r?   r<   r@   r8   r   r   r   r   r     s     zNewChallengeList.getc                 C   s   t | j| jd dS rk   rl   r   r   r   r   __call__'  s     zNewChallengeList.__call__c                 C   s   dS )rI   z#<Twilio.Verify.V2.NewChallengeList>r   r   r   r   r   rX   0  s    zNewChallengeList.__repr__)r   r    r!   rY   r$   r   r#   r   r<   r   rm   rX   r[   r   r   r:   r   rj      s
   		rj   N)r"   r   typingr   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r<   rj   r   r   r   r   <module>   s    b