import { PipelineRuns } 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 { RunFilterParameters , PipelineRunsQueryByFactoryOptionalParams , PipelineRunsQueryByFactoryResponse , PipelineRunsGetOptionalParams , PipelineRunsGetResponse , PipelineRunsCancelOptionalParams } from "../models" ; /** Class containing PipelineRuns operations. */ export class PipelineRunsImpl implements PipelineRuns { private readonly client : DataFactoryClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param factoryName param filterParameters param options queryByFactory ( resourceGroupName , factoryName , filterParameters , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , factoryName , filterParameters , options } , queryByFactoryOperationSpec ) ; } param resourceGroupName param factoryName param runId param options get ( resourceGroupName , factoryName , runId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , factoryName , runId , options } , getOperationSpec ) ; } param resourceGroupName param factoryName param runId param options cancel ( resourceGroupName , factoryName , runId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , factoryName , runId , options } , cancelOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const queryByFactoryOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . PipelineRunsQueryResponse } , 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 } ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . PipelineRun } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . factoryName , Parameters . runId ] , headerParameters : [ Parameters . accept ] , serializer } ; const cancelOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel" , httpMethod : "POST" , responses : { 200 : { } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion , Parameters . isRecursive ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . factoryName , Parameters . runId ] , headerParameters : [ Parameters . accept ] , serializer } ;