public async Task <PipelineCreateOrUpdateResponse> CreateOrUpdateAsync(
            string resourceGroupName,
            string dataFactoryName,
            PipelineCreateOrUpdateParameters parameters,
            CancellationToken cancellationToken)
        {
            Core.Models.PipelineCreateOrUpdateParameters internalParameters = this.ValidateAndConvert(parameters);

            Core.Models.PipelineCreateOrUpdateResponse response =
                await this.Client.InternalClient.Pipelines.CreateOrUpdateAsync(
                    resourceGroupName,
                    dataFactoryName,
                    internalParameters,
                    cancellationToken);

            return(new PipelineCreateOrUpdateResponse(response, this.Client));
        }
        public async Task <PipelineCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(
            string resourceGroupName,
            string dataFactoryName,
            string dataPipelineName,
            PipelineCreateOrUpdateWithRawJsonContentParameters parameters,
            CancellationToken cancellationToken)
        {
            var internalParameters =
                new Core.Models.PipelineCreateOrUpdateWithRawJsonContentParameters(parameters.Content);

            Core.Models.PipelineCreateOrUpdateResponse response =
                await this.Client.InternalClient.Pipelines.CreateOrUpdateWithRawJsonContentAsync(
                    resourceGroupName,
                    dataFactoryName,
                    dataPipelineName,
                    internalParameters,
                    cancellationToken);

            return(new PipelineCreateOrUpdateResponse(response, this.Client));
        }
        public async Task <PipelineCreateOrUpdateResponse> GetCreateOrUpdateStatusAsync(
            string operationStatusLink,
            CancellationToken cancellationToken)
        {
            Ensure.IsNotNull(operationStatusLink, "operationStatusLink");

            Core.Models.PipelineCreateOrUpdateResponse internalResponse =
                await this.Client.InternalClient.Pipelines.GetCreateOrUpdateStatusAsync(
                    operationStatusLink,
                    cancellationToken);

            var response = new PipelineCreateOrUpdateResponse(internalResponse, this.Client);

            if (response.Pipeline != null && response.Pipeline.Properties != null &&
                response.Pipeline.Properties.ProvisioningState != null)
            {
                response.Status = response.Pipeline.Properties.ProvisioningState.ToOperationStatus();
            }

            return(response);
        }