import { TriggerRuns } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { DataFactoryClient } from "../dataFactoryClient" ; import { TriggerRunsRerunOptionalParams , TriggerRunsCancelOptionalParams , RunFilterParameters , TriggerRunsQueryByFactoryOptionalParams , TriggerRunsQueryByFactoryResponse } from "../models" ; /** Class containing TriggerRuns operations. */ export class TriggerRunsImpl implements TriggerRuns { private readonly client : DataFactoryClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param factoryName param triggerName param runId param options rerun ( resourceGroupName , factoryName , triggerName , runId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , factoryName , triggerName , runId , options } , rerunOperationSpec ) ; } param resourceGroupName param factoryName param triggerName param runId param options cancel ( resourceGroupName , factoryName , triggerName , runId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , factoryName , triggerName , runId , options } , cancelOperationSpec ) ; } param resourceGroupName param factoryName param filterParameters param options queryByFactory ( resourceGroupName , factoryName , filterParameters , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , factoryName , filterParameters , options } , queryByFactoryOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const rerunOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/rerun" , httpMethod : "POST" , responses : { 200 : { } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . factoryName , Parameters . runId , Parameters . triggerName ] , headerParameters : [ Parameters . accept ] , serializer } ; const cancelOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/cancel" , httpMethod : "POST" , responses : { 200 : { } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . factoryName , Parameters . runId , Parameters . triggerName ] , headerParameters : [ Parameters . accept ] , serializer } ; const queryByFactoryOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryTriggerRuns" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . TriggerRunsQueryResponse } , default : { bodyMapper : Mappers . CloudError } } , requestBody : Parameters . filterParameters , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . factoryName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ;