# Google Cloud Dataproc v1 API - Class BatchControllerClient (5.27.0)

5.27.0 (latest) 5.26.0 5.25.0 5.24.0 5.23.0 5.22.0 5.21.0 5.20.0 5.19.0 5.18.0 5.17.0 5.16.0 5.15.0 5.14.0 5.13.0 5.12.0 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.0.0 3.4.0 3.3.0 3.2.0 3.1.0

    public abstract class BatchControllerClient

Reference documentation and code samples for the Google Cloud Dataproc v1 API class BatchControllerClient.

BatchController client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> BatchControllerClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[BatchControllerClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClientImpl)

## Namespace

[Google.Cloud.Dataproc.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1)

## Assembly

Google.Cloud.Dataproc.V1.dll

## Remarks

The BatchController provides methods to manage batch workloads.

## Properties

### CreateBatchOperationsClient

    public virtual OperationsClient CreateBatchOperationsClient { get; }

The long-running operations client for `CreateBatch`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the BatchController service, which is a host of "dataproc.googleapis.com" and a
port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default BatchController scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default BatchController scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/dataproc>
- <https://www.googleapis.com/auth/dataproc.read-only>

### GrpcClient

    public virtual BatchController.BatchControllerClient GrpcClient { get; }

The underlying gRPC BatchController client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchController.BatchControllerClient` |   |

### IAMPolicyClient

    public virtual IAMPolicyClient IAMPolicyClient { get; }

The [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static BatchControllerClient Create()

Synchronously creates a [BatchControllerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [BatchControllerClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient` | The created [BatchControllerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient). |

### CreateAsync(CancellationToken)

    public static Task<BatchControllerClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [BatchControllerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [BatchControllerClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient` | The task representing the created [BatchControllerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient). |

### CreateBatch(LocationName, Batch, string, CallSettings)

    public virtual Operation<Batch, BatchOperationMetadata> CreateBatch(LocationName parent, Batch batch, string batchId, CallSettings callSettings = null)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this batch will be created. |
| `batch` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` Required. The batch to create. |
| `batchId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | The RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Batch batch = new Batch();
    string batchId = "";
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = batchControllerClient.CreateBatch(parent, batch, batchId);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = batchControllerClient.PollOnceCreateBatch(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatch(CreateBatchRequest, CallSettings)

    public virtual Operation<Batch, BatchOperationMetadata> CreateBatch(CreateBatchRequest request, CallSettings callSettings = null)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.CreateBatchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | The RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    CreateBatchRequest request = new CreateBatchRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Batch = new Batch(),
        BatchId = "",
        RequestId = "",
    };
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = batchControllerClient.CreateBatch(request);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = batchControllerClient.PollOnceCreateBatch(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatch(string, Batch, string, CallSettings)

    public virtual Operation<Batch, BatchOperationMetadata> CreateBatch(string parent, Batch batch, string batchId, CallSettings callSettings = null)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this batch will be created. |
| `batch` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` Required. The batch to create. |
| `batchId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | The RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Batch batch = new Batch();
    string batchId = "";
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = batchControllerClient.CreateBatch(parent, batch, batchId);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = batchControllerClient.PollOnceCreateBatch(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatchAsync(LocationName, Batch, string, CallSettings)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(LocationName parent, Batch batch, string batchId, CallSettings callSettings = null)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this batch will be created. |
| `batch` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` Required. The batch to create. |
| `batchId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Batch batch = new Batch();
    string batchId = "";
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatchAsync(LocationName, Batch, string, CancellationToken)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(LocationName parent, Batch batch, string batchId, CancellationToken cancellationToken)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this batch will be created. |
| `batch` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` Required. The batch to create. |
| `batchId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Batch batch = new Batch();
    string batchId = "";
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatchAsync(CreateBatchRequest, CallSettings)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(CreateBatchRequest request, CallSettings callSettings = null)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.CreateBatchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    CreateBatchRequest request = new CreateBatchRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Batch = new Batch(),
        BatchId = "",
        RequestId = "",
    };
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatchAsync(CreateBatchRequest, CancellationToken)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(CreateBatchRequest request, CancellationToken cancellationToken)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.CreateBatchRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    CreateBatchRequest request = new CreateBatchRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Batch = new Batch(),
        BatchId = "",
        RequestId = "",
    };
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatchAsync(string, Batch, string, CallSettings)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(string parent, Batch batch, string batchId, CallSettings callSettings = null)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this batch will be created. |
| `batch` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` Required. The batch to create. |
| `batchId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Batch batch = new Batch();
    string batchId = "";
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### CreateBatchAsync(string, Batch, string, CancellationToken)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(string parent, Batch batch, string batchId, CancellationToken cancellationToken)

Creates a batch workload that executes asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this batch will be created. |
| `batch` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` Required. The batch to create. |
| `batchId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Batch batch = new Batch();
    string batchId = "";
    // Make the request
    Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);

    // Poll until the returned long-running operation is complete
    Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Batch result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Batch retrievedResult = retrievedResponse.Result;
    }

### DeleteBatch(BatchName, CallSettings)

    public virtual void DeleteBatch(BatchName name, CallSettings callSettings = null)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchName` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
    // Make the request
    batchControllerClient.DeleteBatch(name);

### DeleteBatch(DeleteBatchRequest, CallSettings)

    public virtual void DeleteBatch(DeleteBatchRequest request, CallSettings callSettings = null)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DeleteBatchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    DeleteBatchRequest request = new DeleteBatchRequest
    {
        BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
    };
    // Make the request
    batchControllerClient.DeleteBatch(request);

### DeleteBatch(string, CallSettings)

    public virtual void DeleteBatch(string name, CallSettings callSettings = null)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
    // Make the request
    batchControllerClient.DeleteBatch(name);

### DeleteBatchAsync(BatchName, CallSettings)

    public virtual Task DeleteBatchAsync(BatchName name, CallSettings callSettings = null)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchName` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
    // Make the request
    await batchControllerClient.DeleteBatchAsync(name);

### DeleteBatchAsync(BatchName, CancellationToken)

    public virtual Task DeleteBatchAsync(BatchName name, CancellationToken cancellationToken)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchName` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
    // Make the request
    await batchControllerClient.DeleteBatchAsync(name);

### DeleteBatchAsync(DeleteBatchRequest, CallSettings)

    public virtual Task DeleteBatchAsync(DeleteBatchRequest request, CallSettings callSettings = null)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DeleteBatchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteBatchRequest request = new DeleteBatchRequest
    {
        BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
    };
    // Make the request
    await batchControllerClient.DeleteBatchAsync(request);

### DeleteBatchAsync(DeleteBatchRequest, CancellationToken)

    public virtual Task DeleteBatchAsync(DeleteBatchRequest request, CancellationToken cancellationToken)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.DeleteBatchRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    DeleteBatchRequest request = new DeleteBatchRequest
    {
        BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
    };
    // Make the request
    await batchControllerClient.DeleteBatchAsync(request);

### DeleteBatchAsync(string, CallSettings)

    public virtual Task DeleteBatchAsync(string name, CallSettings callSettings = null)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
    // Make the request
    await batchControllerClient.DeleteBatchAsync(name);

### DeleteBatchAsync(string, CancellationToken)

    public virtual Task DeleteBatchAsync(string name, CancellationToken cancellationToken)

Deletes the batch workload resource. If the batch is not in a
`CANCELLED`, `SUCCEEDED` or `FAILED`
\[`State`\]\[google.cloud.dataproc.v1.Batch.State\], the delete operation fails
and the response returns `FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
    // Make the request
    await batchControllerClient.DeleteBatchAsync(name);

### GetBatch(BatchName, CallSettings)

    public virtual Batch GetBatch(BatchName name, CallSettings callSettings = null)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchName` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | The RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
    // Make the request
    Batch response = batchControllerClient.GetBatch(name);

### GetBatch(GetBatchRequest, CallSettings)

    public virtual Batch GetBatch(GetBatchRequest request, CallSettings callSettings = null)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.GetBatchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | The RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    GetBatchRequest request = new GetBatchRequest
    {
        BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
    };
    // Make the request
    Batch response = batchControllerClient.GetBatch(request);

### GetBatch(string, CallSettings)

    public virtual Batch GetBatch(string name, CallSettings callSettings = null)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | The RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
    // Make the request
    Batch response = batchControllerClient.GetBatch(name);

### GetBatchAsync(BatchName, CallSettings)

    public virtual Task<Batch> GetBatchAsync(BatchName name, CallSettings callSettings = null)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchName` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
    // Make the request
    Batch response = await batchControllerClient.GetBatchAsync(name);

### GetBatchAsync(BatchName, CancellationToken)

    public virtual Task<Batch> GetBatchAsync(BatchName name, CancellationToken cancellationToken)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchName` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
    // Make the request
    Batch response = await batchControllerClient.GetBatchAsync(name);

### GetBatchAsync(GetBatchRequest, CallSettings)

    public virtual Task<Batch> GetBatchAsync(GetBatchRequest request, CallSettings callSettings = null)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.GetBatchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    GetBatchRequest request = new GetBatchRequest
    {
        BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
    };
    // Make the request
    Batch response = await batchControllerClient.GetBatchAsync(request);

### GetBatchAsync(GetBatchRequest, CancellationToken)

    public virtual Task<Batch> GetBatchAsync(GetBatchRequest request, CancellationToken cancellationToken)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.GetBatchRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    GetBatchRequest request = new GetBatchRequest
    {
        BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
    };
    // Make the request
    Batch response = await batchControllerClient.GetBatchAsync(request);

### GetBatchAsync(string, CallSettings)

    public virtual Task<Batch> GetBatchAsync(string name, CallSettings callSettings = null)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
    // Make the request
    Batch response = await batchControllerClient.GetBatchAsync(name);

### GetBatchAsync(string, CancellationToken)

    public virtual Task<Batch> GetBatchAsync(string name, CancellationToken cancellationToken)

Gets the batch workload resource representation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A Task containing the RPC response. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
    // Make the request
    Batch response = await batchControllerClient.GetBatchAsync(name);

### ListBatches(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListBatchesResponse, Batch> ListBatches(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists batch workloads.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent, which owns this collection of batches. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A pageable sequence of [Batch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch) resources. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListBatchesResponse, Batch> response = batchControllerClient.ListBatches(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Batch item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListBatchesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Batch item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Batch> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Batch item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListBatches(ListBatchesRequest, CallSettings)

    public virtual PagedEnumerable<ListBatchesResponse, Batch> ListBatches(ListBatchesRequest request, CallSettings callSettings = null)

Lists batch workloads.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A pageable sequence of [Batch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch) resources. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    ListBatchesRequest request = new ListBatchesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
        OrderBy = "",
    };
    // Make the request
    PagedEnumerable<ListBatchesResponse, Batch> response = batchControllerClient.ListBatches(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Batch item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListBatchesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Batch item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Batch> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Batch item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListBatches(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListBatchesResponse, Batch> ListBatches(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists batch workloads.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent, which owns this collection of batches. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A pageable sequence of [Batch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch) resources. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = BatchControllerClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListBatchesResponse, Batch> response = batchControllerClient.ListBatches(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Batch item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListBatchesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Batch item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Batch> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Batch item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListBatchesAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListBatchesResponse, Batch> ListBatchesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists batch workloads.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent, which owns this collection of batches. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A pageable asynchronous sequence of [Batch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch) resources. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListBatchesResponse, Batch> response = batchControllerClient.ListBatchesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Batch item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListBatchesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Batch item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Batch> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Batch item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListBatchesAsync(ListBatchesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListBatchesResponse, Batch> ListBatchesAsync(ListBatchesRequest request, CallSettings callSettings = null)

Lists batch workloads.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A pageable asynchronous sequence of [Batch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch) resources. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    ListBatchesRequest request = new ListBatchesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Filter = "",
        OrderBy = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListBatchesResponse, Batch> response = batchControllerClient.ListBatchesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Batch item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListBatchesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Batch item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Batch> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Batch item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListBatchesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListBatchesResponse, Batch> ListBatchesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists batch workloads.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent, which owns this collection of batches. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.ListBatchesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch` | A pageable asynchronous sequence of [Batch](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batch) resources. |

**Example**

    // Create client
    BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListBatchesResponse, Batch> response = batchControllerClient.ListBatchesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Batch item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListBatchesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Batch item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Batch> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Batch item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PollOnceCreateBatch(string, CallSettings)

    public virtual Operation<Batch, BatchOperationMetadata> PollOnceCreateBatch(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `CreateBatch`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | The result of polling the operation. |

### PollOnceCreateBatchAsync(string, CallSettings)

    public virtual Task<Operation<Batch, BatchOperationMetadata>> PollOnceCreateBatchAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`CreateBatch`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Batchhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchOperationMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient#Google_Cloud_Dataproc_V1_BatchControllerClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient#Google_Cloud_Dataproc_V1_BatchControllerClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient#Google_Cloud_Dataproc_V1_BatchControllerClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.BatchControllerClient#Google_Cloud_Dataproc_V1_BatchControllerClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.