DataFlowDebugSessionAsyncClient.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.analytics.synapse.artifacts;
import com.azure.analytics.synapse.artifacts.implementation.DataFlowDebugSessionsImpl;
import com.azure.analytics.synapse.artifacts.models.AddDataFlowToDebugSessionResponse;
import com.azure.analytics.synapse.artifacts.models.CloudErrorAutoGeneratedException;
import com.azure.analytics.synapse.artifacts.models.CreateDataFlowDebugSessionRequest;
import com.azure.analytics.synapse.artifacts.models.CreateDataFlowDebugSessionResponse;
import com.azure.analytics.synapse.artifacts.models.DataFlowDebugCommandRequest;
import com.azure.analytics.synapse.artifacts.models.DataFlowDebugCommandResponse;
import com.azure.analytics.synapse.artifacts.models.DataFlowDebugPackage;
import com.azure.analytics.synapse.artifacts.models.DataFlowDebugSessionInfo;
import com.azure.analytics.synapse.artifacts.models.DataFlowDebugSessionsCreateDataFlowDebugSessionResponse;
import com.azure.analytics.synapse.artifacts.models.DataFlowDebugSessionsExecuteCommandResponse;
import com.azure.analytics.synapse.artifacts.models.DeleteDataFlowDebugSessionRequest;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.Response;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the asynchronous ArtifactsClient type. */
@ServiceClient(builder = ArtifactsClientBuilder.class, isAsync = true)
public final class DataFlowDebugSessionAsyncClient {
private final DataFlowDebugSessionsImpl serviceClient;
/**
* Initializes an instance of DataFlowDebugSessions client.
*
* @param serviceClient the service client implementation.
*/
DataFlowDebugSessionAsyncClient(DataFlowDebugSessionsImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
* Creates a data flow debug session.
*
* @param request Data flow debug session definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response body structure for creating data flow debug session.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DataFlowDebugSessionsCreateDataFlowDebugSessionResponse> createDataFlowDebugSessionWithResponse(
CreateDataFlowDebugSessionRequest request) {
return this.serviceClient.createDataFlowDebugSessionWithResponseAsync(request);
}
/**
* Creates a data flow debug session.
*
* @param request Data flow debug session definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response body structure for creating data flow debug session.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<CreateDataFlowDebugSessionResponse> createDataFlowDebugSession(
CreateDataFlowDebugSessionRequest request) {
return this.serviceClient.createDataFlowDebugSessionAsync(request);
}
/**
* Query all active data flow debug sessions.
*
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of active debug sessions.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<DataFlowDebugSessionInfo> queryDataFlowDebugSessionsByWorkspace() {
return this.serviceClient.queryDataFlowDebugSessionsByWorkspaceAsync();
}
/**
* Add a data flow into debug session.
*
* @param request Data flow debug session definition with debug content.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response body structure for starting data flow debug session.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<AddDataFlowToDebugSessionResponse>> addDataFlowWithResponse(DataFlowDebugPackage request) {
return this.serviceClient.addDataFlowWithResponseAsync(request);
}
/**
* Add a data flow into debug session.
*
* @param request Data flow debug session definition with debug content.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response body structure for starting data flow debug session.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<AddDataFlowToDebugSessionResponse> addDataFlow(DataFlowDebugPackage request) {
return this.serviceClient.addDataFlowAsync(request);
}
/**
* Deletes a data flow debug session.
*
* @param request Data flow debug session definition for deletion.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> deleteDataFlowDebugSessionWithResponse(DeleteDataFlowDebugSessionRequest request) {
return this.serviceClient.deleteDataFlowDebugSessionWithResponseAsync(request);
}
/**
* Deletes a data flow debug session.
*
* @param request Data flow debug session definition for deletion.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> deleteDataFlowDebugSession(DeleteDataFlowDebugSessionRequest request) {
return this.serviceClient.deleteDataFlowDebugSessionAsync(request);
}
/**
* Execute a data flow debug command.
*
* @param request Data flow debug command definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response body structure of data flow result for data preview, statistics or expression preview.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DataFlowDebugSessionsExecuteCommandResponse> executeCommandWithResponse(
DataFlowDebugCommandRequest request) {
return this.serviceClient.executeCommandWithResponseAsync(request);
}
/**
* Execute a data flow debug command.
*
* @param request Data flow debug command definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response body structure of data flow result for data preview, statistics or expression preview.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DataFlowDebugCommandResponse> executeCommand(DataFlowDebugCommandRequest request) {
return this.serviceClient.executeCommandAsync(request);
}
}