/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */

import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { SimplePollerLike, OperationState } from "@azure/core-lro";
import {
  WorkflowTriggerHistory,
  WorkflowTriggerHistoriesListOptionalParams,
  WorkflowTriggerHistoriesGetOptionalParams,
  WorkflowTriggerHistoriesGetResponse,
  WorkflowTriggerHistoriesResubmitOptionalParams
} from "../models";

/// <reference lib="esnext.asynciterable" />
/** Interface representing a WorkflowTriggerHistories. */
export interface WorkflowTriggerHistories {
  /**
   * Gets a list of workflow trigger histories.
   * @param resourceGroupName Name of the resource group to which the resource belongs.
   * @param name Site name.
   * @param workflowName The workflow name.
   * @param triggerName The workflow trigger name.
   * @param options The options parameters.
   */
  list(
    resourceGroupName: string,
    name: string,
    workflowName: string,
    triggerName: string,
    options?: WorkflowTriggerHistoriesListOptionalParams
  ): PagedAsyncIterableIterator<WorkflowTriggerHistory>;
  /**
   * Gets a workflow trigger history.
   * @param resourceGroupName Name of the resource group to which the resource belongs.
   * @param name Site name.
   * @param workflowName The workflow name.
   * @param triggerName The workflow trigger name.
   * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that
   *                    resulted in a run.
   * @param options The options parameters.
   */
  get(
    resourceGroupName: string,
    name: string,
    workflowName: string,
    triggerName: string,
    historyName: string,
    options?: WorkflowTriggerHistoriesGetOptionalParams
  ): Promise<WorkflowTriggerHistoriesGetResponse>;
  /**
   * Resubmits a workflow run based on the trigger history.
   * @param resourceGroupName Name of the resource group to which the resource belongs.
   * @param name Site name.
   * @param workflowName The workflow name.
   * @param triggerName The workflow trigger name.
   * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that
   *                    resulted in a run.
   * @param options The options parameters.
   */
  beginResubmit(
    resourceGroupName: string,
    name: string,
    workflowName: string,
    triggerName: string,
    historyName: string,
    options?: WorkflowTriggerHistoriesResubmitOptionalParams
  ): Promise<SimplePollerLike<OperationState<void>, void>>;
  /**
   * Resubmits a workflow run based on the trigger history.
   * @param resourceGroupName Name of the resource group to which the resource belongs.
   * @param name Site name.
   * @param workflowName The workflow name.
   * @param triggerName The workflow trigger name.
   * @param historyName The workflow trigger history name. Corresponds to the run name for triggers that
   *                    resulted in a run.
   * @param options The options parameters.
   */
  beginResubmitAndWait(
    resourceGroupName: string,
    name: string,
    workflowName: string,
    triggerName: string,
    historyName: string,
    options?: WorkflowTriggerHistoriesResubmitOptionalParams
  ): Promise<void>;
}
