/**
 * This code was generated by
 * \ / _    _  _|   _  _
 *  | (_)\/(_)(_|\/| |(/_  v1.0.0
 *       /       /
 */

import Page = require('../../../../../base/Page');
import Response = require('../../../../../http/response');
import V1 = require('../../../V1');
import { SerializableClass } from '../../../../../interfaces';

/**
 * Initialize the ExecutionContextList
 *
 * @param version - Version of the resource
 * @param flowSid - The SID of the Flow
 * @param executionSid - The SID of the Execution
 */
declare function ExecutionContextList(version: V1, flowSid: string, executionSid: string): ExecutionContextListInstance;

interface ExecutionContextListInstance {
  /**
   * @param sid - sid of instance
   */
  (sid: string): ExecutionContextContext;
  /**
   * Constructs a execution_context
   */
  get(): ExecutionContextContext;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
}

interface ExecutionContextPayload extends ExecutionContextResource, Page.TwilioResponsePayload {
}

interface ExecutionContextResource {
  account_sid: string;
  context: object;
  execution_sid: string;
  flow_sid: string;
  url: string;
}

interface ExecutionContextSolution {
  executionSid?: string;
  flowSid?: string;
}


declare class ExecutionContextContext {
  /**
   * Initialize the ExecutionContextContext
   *
   * @param version - Version of the resource
   * @param flowSid - The SID of the Flow
   * @param executionSid - The SID of the Execution
   */
  constructor(version: V1, flowSid: string, executionSid: string);

  /**
   * fetch a ExecutionContextInstance
   *
   * @param callback - Callback to handle processed record
   */
  fetch(callback?: (error: Error | null, items: ExecutionContextInstance) => any): Promise<ExecutionContextInstance>;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
}


declare class ExecutionContextInstance extends SerializableClass {
  /**
   * Initialize the ExecutionContextContext
   *
   * @param version - Version of the resource
   * @param payload - The instance payload
   * @param flowSid - The SID of the Flow
   * @param executionSid - The SID of the Execution
   */
  constructor(version: V1, payload: ExecutionContextPayload, flowSid: string, executionSid: string);

  private _proxy: ExecutionContextContext;
  accountSid: string;
  context: any;
  executionSid: string;
  /**
   * fetch a ExecutionContextInstance
   *
   * @param callback - Callback to handle processed record
   */
  fetch(callback?: (error: Error | null, items: ExecutionContextInstance) => any): Promise<ExecutionContextInstance>;
  flowSid: string;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
  url: string;
}


declare class ExecutionContextPage extends Page<V1, ExecutionContextPayload, ExecutionContextResource, ExecutionContextInstance> {
  /**
   * Initialize the ExecutionContextPage
   *
   * @param version - Version of the resource
   * @param response - Response from the API
   * @param solution - Path solution
   */
  constructor(version: V1, response: Response<string>, solution: ExecutionContextSolution);

  /**
   * Build an instance of ExecutionContextInstance
   *
   * @param payload - Payload response from the API
   */
  getInstance(payload: ExecutionContextPayload): ExecutionContextInstance;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
}

export { ExecutionContextContext, ExecutionContextInstance, ExecutionContextList, ExecutionContextListInstance, ExecutionContextPage, ExecutionContextPayload, ExecutionContextResource, ExecutionContextSolution }
