U
    ^g%iu                     @   s   d Z ddlmZ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ListOptional)values)InstanceContext)InstanceResource)ListResource)Versionc                       st   e Zd ZdZdeeeef 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  ZS )OperatorAttachmentsInstancez
    :ivar service_sid: The unique SID identifier of the Service.
    :ivar operator_sids: List of Operator SIDs attached to the service. Includes both Custom and Pre-built Operators.
    :ivar url: The URL of this resource.
    N)versionpayloadservice_sidc                    sJ   t  | |d| _|d| _|d| _d|p:| ji| _d | _d S )Nr   operator_sidsurl)super__init__getr   r   r   	_solution_context)selfr   r   r   	__class__ o/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/intelligence/v2/operator_attachments.pyr      s     z$OperatorAttachmentsInstance.__init__OperatorAttachmentsContextreturnc                 C   s&   | j dkr t| j| jd d| _ | j S )a  
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: OperatorAttachmentsContext for this OperatorAttachmentsInstance
        Nr   r   )r   r   _versionr   r   r   r   r   _proxy/   s    
z"OperatorAttachmentsInstance._proxyc                 C   s
   | j  S )s
        Fetch the OperatorAttachmentsInstance


        :returns: The fetched OperatorAttachmentsInstance
        )r!   fetchr    r   r   r   r#   >   s    z!OperatorAttachmentsInstance.fetchc                    s   | j  I dH S )
        Asynchronous coroutine to fetch the OperatorAttachmentsInstance


        :returns: The fetched OperatorAttachmentsInstance
        N)r!   fetch_asyncr    r   r   r   r%   G   s    z'OperatorAttachmentsInstance.fetch_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>V   s     z7OperatorAttachmentsInstance.__repr__.<locals>.<genexpr>z7<Twilio.Intelligence.V2.OperatorAttachmentsInstance {}>joinr   itemsr*   r   contextr   r   r   __repr__P   s    z$OperatorAttachmentsInstance.__repr__)N)__name__
__module____qualname____doc__r
   r   strr   r   r   propertyr!   r#   r%   r5   __classcell__r   r   r   r   r      s   
 
		r   c                       sN   e Zd 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 )r   )r   r   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the OperatorAttachmentsContext

        :param version: Version that contains the resource
        :param service_sid: The unique SID identifier of the Service.
        r   z!/Services/{service_sid}/OperatorsN)r   r   r   r*   _uri)r   r   r   r   r   r   r   \   s
     z#OperatorAttachmentsContext.__init__r   c                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r"   application/jsonAcceptGETmethoduriheadersr   r   )r   ofr   r#   r=   r   r   r   rD   r   r   r   r   r#   k   s    
z OperatorAttachmentsContext.fetchc                    sB   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r$   r>   r?   r@   rA   Nr   r   )r   rE   r   r%   r=   r   r   rF   r   r   r   r%      s    
  z&OperatorAttachmentsContext.fetch_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   r/      s     z6OperatorAttachmentsContext.__repr__.<locals>.<genexpr>z6<Twilio.Intelligence.V2.OperatorAttachmentsContext {}>r0   r3   r   r   r   r5      s    z#OperatorAttachmentsContext.__repr__)r6   r7   r8   r
   r:   r   r   r#   r%   r5   r<   r   r   r   r   r   Z   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 )OperatorAttachmentsList)r   c                    s   t  | dS )zu
        Initialize the OperatorAttachmentsList

        :param version: Version that contains the resource

        N)r   r   )r   r   r   r   r   r      s    z OperatorAttachmentsList.__init__)r   r   c                 C   s   t | j|dS z
        Constructs a OperatorAttachmentsContext

        :param service_sid: The unique SID identifier of the Service.
        r   r   r   r   r   r   r   r   r      s    zOperatorAttachmentsList.getc                 C   s   t | j|dS rH   rI   rJ   r   r   r   __call__   s    z OperatorAttachmentsList.__call__r   c                 C   s   dS )r&   z0<Twilio.Intelligence.V2.OperatorAttachmentsList>r   r    r   r   r   r5      s    z OperatorAttachmentsList.__repr__)r6   r7   r8   r
   r   r:   r   r   rK   r5   r<   r   r   r   r   rG      s   	rG   N)r9   typingr   r   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   rG   r   r   r   r   <module>   s   CE