o
    f>h[                     @   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dedeeef dee dee f fddZ	e
dddZdddZdddZd	efddZd	efddZd	ef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| _|p| j|p | jd| _d | _d S )Nr   r   urlr   r   )super__init__getr   r   r   	_solution_context)selfr   r   r   r   	__class__ b/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/intelligence/v2/operator_attachment.pyr      s   
z#OperatorAttachmentInstance.__init__returnOperatorAttachmentContextc                 C   s.   | j du 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   
   | j  S )r
        Create the OperatorAttachmentInstance


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


        :returns: The created OperatorAttachmentInstance
        N)r   create_asyncr   r   r   r   r&   J      z'OperatorAttachmentInstance.create_asyncc                 C   r    )u
        Deletes the OperatorAttachmentInstance


        :returns: True if delete succeeds, False otherwise
        )r   deleter   r   r   r   r)   S   r#   z!OperatorAttachmentInstance.deletec                    r$   )
        Asynchronous coroutine that deletes the OperatorAttachmentInstance


        :returns: True if delete succeeds, False otherwise
        N)r   delete_asyncr   r   r   r   r+   \   r'   z'OperatorAttachmentInstance.delete_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>k       z6OperatorAttachmentInstance.__repr__.<locals>.<genexpr>z6<Twilio.Intelligence.V2.OperatorAttachmentInstance {}>joinr   itemsr2   r   contextr   r   r   __repr__e      
z#OperatorAttachmentInstance.__repr__)NN)r   r   )r   r
   )__name__
__module____qualname____doc__r	   r   strr   r   r   propertyr   r"   r&   boolr)   r+   r>   __classcell__r   r   r   r   r
      s(    



				r
   c                       sp   e Zd Zdededef fddZdefddZdefd	d
Zde	fddZ
de	fddZdefddZ  ZS )r   r   r   r   c                    s0   t  | ||d| _djdi | 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}Nr   )r   r   r   r2   _uri)r   r   r   r   r   r   r   r   q   s   z"OperatorAttachmentContext.__init__r   c                 C   s<   t i }| jjd| j|d}t| j|| jd | jd dS )r!   POSTmethoduridatar   r   r   )r   ofr   r"   rH   r
   r   r   rM   r   r   r   r   r"      s   
z OperatorAttachmentContext.createc                    sD   t i }| jjd| j|dI dH }t| j|| jd | jd dS )r%   rI   rJ   Nr   r   r   )r   rN   r   r&   rH   r
   r   rO   r   r   r   r&      s   
z&OperatorAttachmentContext.create_asyncc                 C   s   t i }| jjd| j|dS )r(   DELETErK   rL   headers)r   rN   r   r)   rH   r   rR   r   r   r   r)      s   
z OperatorAttachmentContext.deletec                    s&   t i }| jjd| j|dI dH S )r*   rP   rQ   N)r   rN   r   r+   rH   rS   r   r   r   r+      s
   
z&OperatorAttachmentContext.delete_asyncc                 C   r,   )r-   r.   c                 s   r/   r0   r1   r3   r   r   r   r7      r8   z5OperatorAttachmentContext.__repr__.<locals>.<genexpr>z5<Twilio.Intelligence.V2.OperatorAttachmentContext {}>r9   r<   r   r   r   r>      r?   z"OperatorAttachmentContext.__repr__)r@   rA   rB   r	   rD   r   r
   r"   r&   rF   r)   r+   r>   rG   r   r   r   r   r   o   s    r   c                       s\   e Zd Zdef fddZdededefddZdededefd	d
ZdefddZ	  Z
S )OperatorAttachmentListr   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      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   rU   rV   rW   rX   r   r   r   __call__   s   	zOperatorAttachmentList.__call__c                 C   s   dS )r-   z/<Twilio.Intelligence.V2.OperatorAttachmentList>r   r   r   r   r   r>      s   zOperatorAttachmentList.__repr__)r@   rA   rB   r	   r   rD   r   r   rY   r>   rG   r   r   r   r   rT      s    	
rT   N)rC   typingr   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr	   r
   r   rT   r   r   r   r   <module>   s    X_