B
    `                  @   s   d 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G dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                   s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	ExecutionContextListc                s    t t| | ||d| _dS )a  
        Initialize the ExecutionContextList

        :param Version version: Version that contains the resource
        :param flow_sid: The SID of the Flow
        :param execution_sid: The SID of the Execution

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList
        )flow_sidexecution_sidN)superr   __init__	_solution)selfversionr   r	   )	__class__ e/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/studio/v1/flow/execution/execution_context.pyr      s    zExecutionContextList.__init__c             C   s   t | j| jd | jd dS )z
        Constructs a ExecutionContextContext

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        r   r	   )r   r	   )ExecutionContextContext_versionr   )r   r   r   r   get"   s    zExecutionContextList.getc             C   s   t | j| jd | jd dS )z
        Constructs a ExecutionContextContext

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        r   r	   )r   r	   )r   r   r   )r   r   r   r   __call__/   s    zExecutionContextList.__call__c             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z'<Twilio.Studio.V1.ExecutionContextList>r   )r   r   r   r   __repr__<   s    zExecutionContextList.__repr__)__name__
__module____qualname__r   r   r   r   __classcell__r   r   )r   r   r      s   r   c                   s,   e Zd Z fddZdd Zdd Z  ZS )ExecutionContextPagec                s   t t| || || _dS )a  
        Initialize the ExecutionContextPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param flow_sid: The SID of the Flow
        :param execution_sid: The SID of the Execution

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextPage
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextPage
        N)r
   r   r   r   )r   r   responseZsolution)r   r   r   r   H   s    zExecutionContextPage.__init__c             C   s   t | j|| jd | jd dS )a>  
        Build an instance of ExecutionContextInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
        r   r	   )r   r	   )ExecutionContextInstancer   r   )r   payloadr   r   r   get_instanceY   s
    	z!ExecutionContextPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z'<Twilio.Studio.V1.ExecutionContextPage>r   )r   r   r   r   r   i   s    zExecutionContextPage.__repr__)r   r   r   r   r   r   r   r   r   )r   r   r   F   s   r   c                   s,   e Zd Z fddZdd Zdd Z  ZS )r   c                s0   t t| | ||d| _djf | j| _dS )a  
        Initialize the ExecutionContextContext

        :param Version version: Version that contains the resource
        :param flow_sid: The SID of the Flow
        :param execution_sid: The SID of the Execution

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        )r   r	   z4/Flows/{flow_sid}/Executions/{execution_sid}/ContextN)r
   r   r   r   format_uri)r   r   r   r	   )r   r   r   r   u   s    z ExecutionContextContext.__init__c             C   s0   | j jd| jd}t| j || jd | jd dS )z
        Fetch the ExecutionContextInstance

        :returns: The fetched ExecutionContextInstance
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
        GET)methodurir   r	   )r   r	   )r   fetchr!   r   r   )r   r   r   r   r   r%      s    zExecutionContextContext.fetchc             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
         c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r    ).0kvr   r   r   	<genexpr>   s    z3ExecutionContextContext.__repr__.<locals>.<genexpr>z-<Twilio.Studio.V1.ExecutionContextContext {}>)joinr   itemsr    )r   contextr   r   r   r      s    z ExecutionContextContext.__repr__)r   r   r   r   r%   r   r   r   r   )r   r   r   s   s   r   c                   st   e Zd Z fddZedd Zedd Zedd Zed	d
 Zedd Z	edd Z
dd Zdd Z  ZS )r   c                sV   t t| | |d|d|d|d|dd| _d| _||d| _dS )	z
        Initialize the ExecutionContextInstance

        :returns: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
        account_sidr-   r   r	   url)r.   r-   r   r	   r/   N)r   r	   )r
   r   r   r   _properties_contextr   )r   r   r   r   r	   )r   r   r   r      s    z!ExecutionContextInstance.__init__c             C   s.   | j dkr(t| j| jd | 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: ExecutionContextContext for this ExecutionContextInstance
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
        Nr   r	   )r   r	   )r1   r   r   r   )r   r   r   r   _proxy   s    	
zExecutionContextInstance._proxyc             C   s
   | j d S )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        r.   )r0   )r   r   r   r   r.      s    z$ExecutionContextInstance.account_sidc             C   s
   | j d S )zN
        :returns: The current state of the flow
        :rtype: dict
        r-   )r0   )r   r   r   r   r-      s    z ExecutionContextInstance.contextc             C   s
   | j d S )zG
        :returns: The SID of the Flow
        :rtype: unicode
        r   )r0   )r   r   r   r   r      s    z!ExecutionContextInstance.flow_sidc             C   s
   | j d S )zL
        :returns: The SID of the Execution
        :rtype: unicode
        r	   )r0   )r   r   r   r   r	      s    z&ExecutionContextInstance.execution_sidc             C   s
   | j d S )zT
        :returns: The absolute URL of the resource
        :rtype: unicode
        r/   )r0   )r   r   r   r   r/      s    zExecutionContextInstance.urlc             C   s
   | j  S )z
        Fetch the ExecutionContextInstance

        :returns: The fetched ExecutionContextInstance
        :rtype: twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
        )r2   r%   )r   r   r   r   r%      s    zExecutionContextInstance.fetchc             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        r&   c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r    )r'   r(   r)   r   r   r   r*     s    z4ExecutionContextInstance.__repr__.<locals>.<genexpr>z.<Twilio.Studio.V1.ExecutionContextInstance {}>)r+   r   r,   r    )r   r-   r   r   r   r      s    z!ExecutionContextInstance.__repr__)r   r   r   r   propertyr2   r.   r-   r   r	   r/   r%   r   r   r   r   )r   r   r      s   	r   N)__doc__Ztwilio.baser   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.pager   r   r   r   r   r   r   r   r   <module>   s   6-.