U
    ^g%i)                     @   s   d Z ddlmZ ddlmZmZmZmZ ddl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 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 - Numbers
    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Union)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                       s   e Zd ZG dd deZdeeeef e	e d fddZ
eddd	d
Zejejfeeeef eeef d dddZejejfeeeef eeef d dddZedddZ  ZS )BundleCloneInstancec                   @   s$   e Zd ZdZdZdZdZdZdZdS )zBundleCloneInstance.StatusZdraftzpending-reviewz	in-reviewztwilio-rejectedztwilio-approvedzprovisionally-approvedN)	__name__
__module____qualname__ZDRAFTZPENDING_REVIEWZ	IN_REVIEWZTWILIO_REJECTEDZTWILIO_APPROVEDZPROVISIONALLY_APPROVED r   r   b/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/numbers/v2/bundle_clone.pyStatus   s   r   N)versionpayload
bundle_sidc                    s   t  | |d| _|d| _|d| _|d| _|d| _t	|d| _
|d| _|d| _t	|d	| _t	|d
| _|d| _d|p| ji| _d | _d S )Nr   account_sidregulation_sidfriendly_namestatusvalid_untilemailstatus_callbackdate_createddate_updatedurl)super__init__getr   r   r   r   r   r   Ziso8601_datetimer   r   r   r   r    r!   	_solution_context)selfr   r   r   	__class__r   r   r#   0   s,     zBundleCloneInstance.__init__BundleCloneContext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: BundleCloneContext for this BundleCloneInstance
        Nr   r   )r&   r*   _versionr%   r'   r   r   r   _proxyO   s    
zBundleCloneInstance._proxytarget_account_sidmove_to_draftr   r,   c                 C   s   | j j|||dS )  
        Create the BundleCloneInstance

        :param target_account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) where the bundle needs to be cloned.
        :param move_to_draft: If set to true, the cloned bundle will be in the DRAFT state, else it will be twilio-approved
        :param friendly_name: The string that you assigned to describe the cloned bundle.

        :returns: The created BundleCloneInstance
        r3   r   )r0   creater'   r2   r3   r   r   r   r   r6   ^   s
    zBundleCloneInstance.createc                    s   | j j|||dI dH S )  
        Asynchronous coroutine to create the BundleCloneInstance

        :param target_account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) where the bundle needs to be cloned.
        :param move_to_draft: If set to true, the cloned bundle will be in the DRAFT state, else it will be twilio-approved
        :param friendly_name: The string that you assigned to describe the cloned bundle.

        :returns: The created BundleCloneInstance
        r5   N)r0   create_asyncr7   r   r   r   r9   s   s
    z BundleCloneInstance.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     z/BundleCloneInstance.__repr__.<locals>.<genexpr>z*<Twilio.Numbers.V2.BundleCloneInstance {}>joinr%   itemsr>   r'   contextr   r   r   __repr__   s    zBundleCloneInstance.__repr__)N)r   r   r   objectr   r   r   strr   r   r#   propertyr0   r	   unsetr   boolr6   r9   rI   __classcell__r   r   r(   r   r      s4    




r   c                       s   e Zd Zeed fddZejejfeee	e
f eee
f edddZejejfeee	e
f eee
f edddZed	d
dZ  ZS )r*   )r   r   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the BundleCloneContext

        :param version: Version that contains the resource
        :param bundle_sid: The unique string that identifies the Bundle to be cloned.
        r   z1/RegulatoryCompliance/Bundles/{bundle_sid}/ClonesN)r"   r#   r%   r>   _uri)r'   r   r   r(   r   r   r#      s     zBundleCloneContext.__init__r1   c                 C   s^   t |t||d}t i }d|d< d|d< | jjd| j||d}t| j|| jd d	S )
r4   ZTargetAccountSidZMoveToDraftZFriendlyName!application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethoduridataheadersr   r-   )	r	   ofr   boolean_to_stringr.   r6   rP   r   r%   r'   r2   r3   r   rZ   r[   r   r   r   r   r6      s(    
     zBundleCloneContext.createc                    sd   t |t||d}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd	 d
S )r8   rQ   rR   rS   rT   rU   rV   rW   Nr   r-   )	r	   r\   r   r]   r.   r9   rP   r   r%   r^   r   r   r   r9      s(    
     zBundleCloneContext.create_asyncr+   c                 C   s$   d dd | j D }d|S )r:   r;   c                 s   s   | ]\}}d  ||V  qdS r<   r=   r?   r   r   r   rC      s     z.BundleCloneContext.__repr__.<locals>.<genexpr>z)<Twilio.Numbers.V2.BundleCloneContext {}>rD   rG   r   r   r   rI      s    zBundleCloneContext.__repr__)r   r   r   r   rK   r#   r	   rM   r   rN   rJ   r   r6   r9   rI   rO   r   r   r(   r   r*      s$   

(

%r*   c                       sP   e Zd Z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 )BundleCloneList)r   c                    s   t  | dS )zm
        Initialize the BundleCloneList

        :param version: Version that contains the resource

        N)r"   r#   )r'   r   r(   r   r   r#      s    zBundleCloneList.__init__)r   r,   c                 C   s   t | j|dS z
        Constructs a BundleCloneContext

        :param bundle_sid: The unique string that identifies the Bundle to be cloned.
        r-   r*   r.   r'   r   r   r   r   r$     s    zBundleCloneList.getc                 C   s   t | j|dS r`   ra   rb   r   r   r   __call__  s    zBundleCloneList.__call__r+   c                 C   s   dS )r:   z#<Twilio.Numbers.V2.BundleCloneList>r   r/   r   r   r   rI     s    zBundleCloneList.__repr__)r   r   r   r   r#   rK   r*   r$   rc   rI   rO   r   r   r(   r   r_      s   	r_   N)__doc__r   typingr   r   r   r   Ztwilio.baser   r   r	   Ztwilio.base.instance_contextr
   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r*   r_   r   r   r   r   <module>   s   zg