U
    ^g%i5                     @   s   d 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 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 - Intelligence
    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.
    )AnyDictOptional)values)InstanceContext)InstanceResource)ListResource)Versionc                       s   e Zd ZdZdeeeef ee ee d fddZ	e
dddd	Zd dd
dZd dddZedddZedddZedddZ  ZS )OperatorAttachmentInstancez
    :ivar service_sid: The unique SID identifier of the Service.
    :ivar operator_sid: The unique SID identifier of the Operator.
    :ivar url: The URL of this resource.
    N)versionpayloadservice_sidoperator_sidc                    sR   t  | |d| _|d| _|d| _|p8| j|p@| jd| _d | _d S )Nr   r   urlr   r   )super__init__getr   r   r   	_solution_context)selfr   r   r   r   	__class__ n/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/intelligence/v2/operator_attachment.pyr      s    z#OperatorAttachmentInstance.__init__OperatorAttachmentContextreturnc                 C   s.   | j dkr(t| j| jd | 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: OperatorAttachmentContext for this OperatorAttachmentInstance
        Nr   r   r   )r   r   _versionr   r   r   r   r   _proxy1   s    
z!OperatorAttachmentInstance._proxyc                 C   s
   | j  S )r
        Create the OperatorAttachmentInstance


        :returns: The created OperatorAttachmentInstance
        )r    creater   r   r   r   r"   A   s    z!OperatorAttachmentInstance.createc                    s   | j  I dH S )
        Asynchronous coroutine to create the OperatorAttachmentInstance


        :returns: The created OperatorAttachmentInstance
        N)r    create_asyncr   r   r   r   r$   J   s    z'OperatorAttachmentInstance.create_asyncc                 C   s
   | j  S )u
        Deletes the OperatorAttachmentInstance


        :returns: True if delete succeeds, False otherwise
        )r    deleter   r   r   r   r&   S   s    z!OperatorAttachmentInstance.deletec                    s   | j  I dH S )
        Asynchronous coroutine that deletes the OperatorAttachmentInstance


        :returns: True if delete succeeds, False otherwise
        N)r    delete_asyncr   r   r   r   r(   \   s    z'OperatorAttachmentInstance.delete_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>k   s     z6OperatorAttachmentInstance.__repr__.<locals>.<genexpr>z6<Twilio.Intelligence.V2.OperatorAttachmentInstance {}>joinr   itemsr-   r   contextr   r   r   __repr__e   s    z#OperatorAttachmentInstance.__repr__)NN)__name__
__module____qualname____doc__r	   r   strr   r   r   propertyr    r"   r$   boolr&   r(   r8   __classcell__r   r   r   r   r
      s    
  
				r
   c                       sl   e Zd Zeeed fddZedddZedddZe	dd	d
Z
e	dddZedddZ  ZS )r   )r   r   r   c                    s,   t  | ||d| _djf | j| _dS )a0  
        Initialize the OperatorAttachmentContext

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.
        :param operator_sid: The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
        r   z0/Services/{service_sid}/Operators/{operator_sid}N)r   r   r   r-   _uri)r   r   r   r   r   r   r   r   q   s    z"OperatorAttachmentContext.__init__r   c                 C   sP   t i }t i }d|d< | jjd| j||d}t| j|| jd | jd dS )r!   application/jsonAcceptPOSTmethoduridataheadersr   r   r   )r   ofr   r"   rA   r
   r   r   rH   rI   r   r   r   r   r"      s    

   z OperatorAttachmentContext.createc                    sV   t i }t i }d|d< | jjd| j||dI dH }t| j|| jd | jd dS )	r#   rB   rC   rD   rE   Nr   r   r   )r   rJ   r   r$   rA   r
   r   rK   r   r   r   r$      s    

   z&OperatorAttachmentContext.create_asyncc                 C   s   t i }| jjd| j|dS )r%   DELETErF   rG   rI   )r   rJ   r   r&   rA   r   rI   r   r   r   r&      s    
z OperatorAttachmentContext.deletec                    s$   t i }| jjd| j|dI dH S )r'   rL   rM   N)r   rJ   r   r(   rA   rN   r   r   r   r(      s    
  z&OperatorAttachmentContext.delete_asyncc                 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   r2      s     z5OperatorAttachmentContext.__repr__.<locals>.<genexpr>z5<Twilio.Intelligence.V2.OperatorAttachmentContext {}>r3   r6   r   r   r   r8      s    z"OperatorAttachmentContext.__repr__)r9   r:   r;   r	   r=   r   r
   r"   r$   r?   r&   r(   r8   r@   r   r   r   r   r   o   s   r   c                       sT   e Zd Zed fddZeeedddZeeedddZed	d
dZ	  Z
S )OperatorAttachmentList)r   c                    s   t  | dS )zt
        Initialize the OperatorAttachmentList

        :param version: Version that contains the resource

        N)r   r   )r   r   r   r   r   r      s    zOperatorAttachmentList.__init__)r   r   r   c                 C   s   t | j||dS z
        Constructs a OperatorAttachmentContext

        :param service_sid: The unique SID identifier of the Service.
        :param operator_sid: The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
        r   r   r   r   r   r   r   r   r   r      s
      zOperatorAttachmentList.getc                 C   s   t | j||dS rP   rQ   rR   r   r   r   __call__   s
    	  zOperatorAttachmentList.__call__r   c                 C   s   dS )r)   z/<Twilio.Intelligence.V2.OperatorAttachmentList>r   r   r   r   r   r8      s    zOperatorAttachmentList.__repr__)r9   r:   r;   r	   r   r=   r   r   rS   r8   r@   r   r   r   r   rO      s   	 rO   N)r<   typingr   r   r   Ztwilio.baser   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr	   r
   r   rO   r   r   r   r   <module>   s   Xi