3.2.0 (latest) 3.1.0 3.0.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public abstract class TestCasesClient

Reference documentation and code samples for the Dialogflow v3 API class TestCasesClient.

TestCases client wrapper, for convenient use.

## Inheritance

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

## 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

[TestCasesClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClientImpl.md.txt)

## Namespace

[Google.Cloud.Dialogflow.Cx.V3](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.md.txt)

## Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

## Remarks

Service for managing \[Test Cases\]\[google.cloud.dialogflow.cx.v3.TestCase\] and
\[Test Case Results\]\[google.cloud.dialogflow.cx.v3.TestCaseResult\].

## Properties

### BatchRunTestCasesOperationsClient

    public virtual OperationsClient BatchRunTestCasesOperationsClient { get; }

The long-running operations client for `BatchRunTestCases`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default TestCases scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IReadOnlyListstring` |   |

**Remarks** The default TestCases scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/dialogflow>

### ExportTestCasesOperationsClient

    public virtual OperationsClient ExportTestCasesOperationsClient { get; }

The long-running operations client for `ExportTestCases`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### GrpcClient

    public virtual TestCases.TestCasesClient GrpcClient { get; }

The underlying gRPC TestCases client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `TestCasesTestCasesClient` |   |

### ImportTestCasesOperationsClient

    public virtual OperationsClient ImportTestCasesOperationsClient { get; }

The long-running operations client for `ImportTestCases`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.md.txt) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `LocationsClient` |   |

### RunTestCaseOperationsClient

    public virtual OperationsClient RunTestCaseOperationsClient { get; }

The long-running operations client for `RunTestCase`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ServiceMetadata` |   |

## Methods

### BatchDeleteTestCases(AgentName, CallSettings)

    public virtual void BatchDeleteTestCases(AgentName parent, CallSettings callSettings = null)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
testCasesClient.BatchDeleteTestCases(parent);
```

### BatchDeleteTestCases(BatchDeleteTestCasesRequest, CallSettings)

    public virtual void BatchDeleteTestCases(BatchDeleteTestCasesRequest request, CallSettings callSettings = null)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `BatchDeleteTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
BatchDeleteTestCasesRequest request = new BatchDeleteTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    TestCaseNames =
    {
        TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    },
};
// Make the request
testCasesClient.BatchDeleteTestCases(request);
```

### BatchDeleteTestCases(string, CallSettings)

    public virtual void BatchDeleteTestCases(string parent, CallSettings callSettings = null)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
testCasesClient.BatchDeleteTestCases(parent);
```

### BatchDeleteTestCasesAsync(AgentName, CallSettings)

    public virtual Task BatchDeleteTestCasesAsync(AgentName parent, CallSettings callSettings = null)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
```

### BatchDeleteTestCasesAsync(AgentName, CancellationToken)

    public virtual Task BatchDeleteTestCasesAsync(AgentName parent, CancellationToken cancellationToken)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
```

### BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest, CallSettings)

    public virtual Task BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest request, CallSettings callSettings = null)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `BatchDeleteTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteTestCasesRequest request = new BatchDeleteTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    TestCaseNames =
    {
        TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    },
};
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(request);
```

### BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest, CancellationToken)

    public virtual Task BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest request, CancellationToken cancellationToken)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `BatchDeleteTestCasesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteTestCasesRequest request = new BatchDeleteTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    TestCaseNames =
    {
        TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    },
};
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(request);
```

### BatchDeleteTestCasesAsync(string, CallSettings)

    public virtual Task BatchDeleteTestCasesAsync(string parent, CallSettings callSettings = null)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
```

### BatchDeleteTestCasesAsync(string, CancellationToken)

    public virtual Task BatchDeleteTestCasesAsync(string parent, CancellationToken cancellationToken)

Batch deletes test cases.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
```

### BatchRunTestCases(BatchRunTestCasesRequest, CallSettings)

    public virtual Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> BatchRunTestCases(BatchRunTestCasesRequest request, CallSettings callSettings = null)

Kicks off a batch run of test cases.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[BatchRunTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata\]
- `response`: \[BatchRunTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `BatchRunTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationBatchRunTestCasesResponseBatchRunTestCasesMetadata` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
BatchRunTestCasesRequest request = new BatchRunTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
    TestCasesAsTestCaseNames =
    {
        TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    },
};
// Make the request
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> response = testCasesClient.BatchRunTestCases(request);

// Poll until the returned long-running operation is complete
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchRunTestCasesResponse 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<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> retrievedResponse = testCasesClient.PollOnceBatchRunTestCases(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRunTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### BatchRunTestCasesAsync(BatchRunTestCasesRequest, CallSettings)

    public virtual Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> BatchRunTestCasesAsync(BatchRunTestCasesRequest request, CallSettings callSettings = null)

Kicks off a batch run of test cases.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[BatchRunTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata\]
- `response`: \[BatchRunTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `BatchRunTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationBatchRunTestCasesResponseBatchRunTestCasesMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchRunTestCasesRequest request = new BatchRunTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
    TestCasesAsTestCaseNames =
    {
        TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    },
};
// Make the request
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> response = await testCasesClient.BatchRunTestCasesAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRunTestCasesResponse 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<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceBatchRunTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRunTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### BatchRunTestCasesAsync(BatchRunTestCasesRequest, CancellationToken)

    public virtual Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> BatchRunTestCasesAsync(BatchRunTestCasesRequest request, CancellationToken cancellationToken)

Kicks off a batch run of test cases.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[BatchRunTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata\]
- `response`: \[BatchRunTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `BatchRunTestCasesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationBatchRunTestCasesResponseBatchRunTestCasesMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchRunTestCasesRequest request = new BatchRunTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
    TestCasesAsTestCaseNames =
    {
        TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    },
};
// Make the request
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> response = await testCasesClient.BatchRunTestCasesAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRunTestCasesResponse 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<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceBatchRunTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchRunTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### CalculateCoverage(CalculateCoverageRequest, CallSettings)

    public virtual CalculateCoverageResponse CalculateCoverage(CalculateCoverageRequest request, CallSettings callSettings = null)

Calculates the test coverage for an agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CalculateCoverageRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CalculateCoverageResponse` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
CalculateCoverageRequest request = new CalculateCoverageRequest
{
    Type = CalculateCoverageRequest.Types.CoverageType.Unspecified,
    AgentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
CalculateCoverageResponse response = testCasesClient.CalculateCoverage(request);
```

### CalculateCoverageAsync(CalculateCoverageRequest, CallSettings)

    public virtual Task<CalculateCoverageResponse> CalculateCoverageAsync(CalculateCoverageRequest request, CallSettings callSettings = null)

Calculates the test coverage for an agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CalculateCoverageRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskCalculateCoverageResponse` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CalculateCoverageRequest request = new CalculateCoverageRequest
{
    Type = CalculateCoverageRequest.Types.CoverageType.Unspecified,
    AgentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
CalculateCoverageResponse response = await testCasesClient.CalculateCoverageAsync(request);
```

### CalculateCoverageAsync(CalculateCoverageRequest, CancellationToken)

    public virtual Task<CalculateCoverageResponse> CalculateCoverageAsync(CalculateCoverageRequest request, CancellationToken cancellationToken)

Calculates the test coverage for an agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CalculateCoverageRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskCalculateCoverageResponse` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CalculateCoverageRequest request = new CalculateCoverageRequest
{
    Type = CalculateCoverageRequest.Types.CoverageType.Unspecified,
    AgentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
CalculateCoverageResponse response = await testCasesClient.CalculateCoverageAsync(request);
```

### Create()

    public static TestCasesClient Create()

Synchronously creates a [TestCasesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [TestCasesClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClientBuilder.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCasesClient` | The created [TestCasesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [TestCasesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [TestCasesClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClientBuilder.md.txt).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCasesClient` | The task representing the created [TestCasesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt). |

### CreateTestCase(AgentName, TestCase, CallSettings)

    public virtual TestCase CreateTestCase(AgentName parent, TestCase testCase, CallSettings callSettings = null)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `testCase` | `TestCase` Required. The test case to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
TestCase testCase = new TestCase();
// Make the request
TestCase response = testCasesClient.CreateTestCase(parent, testCase);
```

### CreateTestCase(CreateTestCaseRequest, CallSettings)

    public virtual TestCase CreateTestCase(CreateTestCaseRequest request, CallSettings callSettings = null)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
CreateTestCaseRequest request = new CreateTestCaseRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    TestCase = new TestCase(),
};
// Make the request
TestCase response = testCasesClient.CreateTestCase(request);
```

### CreateTestCase(string, TestCase, CallSettings)

    public virtual TestCase CreateTestCase(string parent, TestCase testCase, CallSettings callSettings = null)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `testCase` | `TestCase` Required. The test case to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
TestCase testCase = new TestCase();
// Make the request
TestCase response = testCasesClient.CreateTestCase(parent, testCase);
```

### CreateTestCaseAsync(AgentName, TestCase, CallSettings)

    public virtual Task<TestCase> CreateTestCaseAsync(AgentName parent, TestCase testCase, CallSettings callSettings = null)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `testCase` | `TestCase` Required. The test case to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
```

### CreateTestCaseAsync(AgentName, TestCase, CancellationToken)

    public virtual Task<TestCase> CreateTestCaseAsync(AgentName parent, TestCase testCase, CancellationToken cancellationToken)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `testCase` | `TestCase` Required. The test case to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
```

### CreateTestCaseAsync(CreateTestCaseRequest, CallSettings)

    public virtual Task<TestCase> CreateTestCaseAsync(CreateTestCaseRequest request, CallSettings callSettings = null)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CreateTestCaseRequest request = new CreateTestCaseRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    TestCase = new TestCase(),
};
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(request);
```

### CreateTestCaseAsync(CreateTestCaseRequest, CancellationToken)

    public virtual Task<TestCase> CreateTestCaseAsync(CreateTestCaseRequest request, CancellationToken cancellationToken)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateTestCaseRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CreateTestCaseRequest request = new CreateTestCaseRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    TestCase = new TestCase(),
};
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(request);
```

### CreateTestCaseAsync(string, TestCase, CallSettings)

    public virtual Task<TestCase> CreateTestCaseAsync(string parent, TestCase testCase, CallSettings callSettings = null)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `testCase` | `TestCase` Required. The test case to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
```

### CreateTestCaseAsync(string, TestCase, CancellationToken)

    public virtual Task<TestCase> CreateTestCaseAsync(string parent, TestCase testCase, CancellationToken cancellationToken)

Creates a test case for the given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `testCase` | `TestCase` Required. The test case to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
```

### ExportTestCases(ExportTestCasesRequest, CallSettings)

    public virtual Operation<ExportTestCasesResponse, ExportTestCasesMetadata> ExportTestCases(ExportTestCasesRequest request, CallSettings callSettings = null)

Exports the test cases under the agent to a Cloud Storage bucket or a local
file. Filter can be applied to export a subset of test cases.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[ExportTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata\]
- `response`: \[ExportTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.ExportTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ExportTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationExportTestCasesResponseExportTestCasesMetadata` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
ExportTestCasesRequest request = new ExportTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    GcsUri = "",
    DataFormat = ExportTestCasesRequest.Types.DataFormat.Unspecified,
    Filter = "",
};
// Make the request
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> response = testCasesClient.ExportTestCases(request);

// Poll until the returned long-running operation is complete
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ExportTestCasesResponse 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<ExportTestCasesResponse, ExportTestCasesMetadata> retrievedResponse = testCasesClient.PollOnceExportTestCases(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### ExportTestCasesAsync(ExportTestCasesRequest, CallSettings)

    public virtual Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> ExportTestCasesAsync(ExportTestCasesRequest request, CallSettings callSettings = null)

Exports the test cases under the agent to a Cloud Storage bucket or a local
file. Filter can be applied to export a subset of test cases.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[ExportTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata\]
- `response`: \[ExportTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.ExportTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ExportTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationExportTestCasesResponseExportTestCasesMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ExportTestCasesRequest request = new ExportTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    GcsUri = "",
    DataFormat = ExportTestCasesRequest.Types.DataFormat.Unspecified,
    Filter = "",
};
// Make the request
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> response = await testCasesClient.ExportTestCasesAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportTestCasesResponse 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<ExportTestCasesResponse, ExportTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceExportTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### ExportTestCasesAsync(ExportTestCasesRequest, CancellationToken)

    public virtual Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> ExportTestCasesAsync(ExportTestCasesRequest request, CancellationToken cancellationToken)

Exports the test cases under the agent to a Cloud Storage bucket or a local
file. Filter can be applied to export a subset of test cases.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[ExportTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata\]
- `response`: \[ExportTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.ExportTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ExportTestCasesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationExportTestCasesResponseExportTestCasesMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ExportTestCasesRequest request = new ExportTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    GcsUri = "",
    DataFormat = ExportTestCasesRequest.Types.DataFormat.Unspecified,
    Filter = "",
};
// Make the request
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> response = await testCasesClient.ExportTestCasesAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportTestCasesResponse 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<ExportTestCasesResponse, ExportTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceExportTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### GetTestCase(GetTestCaseRequest, CallSettings)

    public virtual TestCase GetTestCase(GetTestCaseRequest request, CallSettings callSettings = null)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
GetTestCaseRequest request = new GetTestCaseRequest
{
    TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
};
// Make the request
TestCase response = testCasesClient.GetTestCase(request);
```

### GetTestCase(TestCaseName, CallSettings)

    public virtual TestCase GetTestCase(TestCaseName name, CallSettings callSettings = null)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `TestCaseName` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCaseName name = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
TestCase response = testCasesClient.GetTestCase(name);
```

### GetTestCase(string, CallSettings)

    public virtual TestCase GetTestCase(string name, CallSettings callSettings = null)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
TestCase response = testCasesClient.GetTestCase(name);
```

### GetTestCaseAsync(GetTestCaseRequest, CallSettings)

    public virtual Task<TestCase> GetTestCaseAsync(GetTestCaseRequest request, CallSettings callSettings = null)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseRequest request = new GetTestCaseRequest
{
    TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
};
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(request);
```

### GetTestCaseAsync(GetTestCaseRequest, CancellationToken)

    public virtual Task<TestCase> GetTestCaseAsync(GetTestCaseRequest request, CancellationToken cancellationToken)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetTestCaseRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseRequest request = new GetTestCaseRequest
{
    TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
};
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(request);
```

### GetTestCaseAsync(TestCaseName, CallSettings)

    public virtual Task<TestCase> GetTestCaseAsync(TestCaseName name, CallSettings callSettings = null)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `TestCaseName` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseName name = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
```

### GetTestCaseAsync(TestCaseName, CancellationToken)

    public virtual Task<TestCase> GetTestCaseAsync(TestCaseName name, CancellationToken cancellationToken)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `TestCaseName` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseName name = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
```

### GetTestCaseAsync(string, CallSettings)

    public virtual Task<TestCase> GetTestCaseAsync(string name, CallSettings callSettings = null)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
```

### GetTestCaseAsync(string, CancellationToken)

    public virtual Task<TestCase> GetTestCaseAsync(string name, CancellationToken cancellationToken)

Gets a test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
```

### GetTestCaseResult(GetTestCaseResultRequest, CallSettings)

    public virtual TestCaseResult GetTestCaseResult(GetTestCaseResultRequest request, CallSettings callSettings = null)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetTestCaseResultRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCaseResult` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
GetTestCaseResultRequest request = new GetTestCaseResultRequest
{
    TestCaseResultName = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]"),
};
// Make the request
TestCaseResult response = testCasesClient.GetTestCaseResult(request);
```

### GetTestCaseResult(TestCaseResultName, CallSettings)

    public virtual TestCaseResult GetTestCaseResult(TestCaseResultName name, CallSettings callSettings = null)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `TestCaseResultName` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCaseResult` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCaseResultName name = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]");
// Make the request
TestCaseResult response = testCasesClient.GetTestCaseResult(name);
```

### GetTestCaseResult(string, CallSettings)

    public virtual TestCaseResult GetTestCaseResult(string name, CallSettings callSettings = null)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCaseResult` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]/results/[RESULT]";
// Make the request
TestCaseResult response = testCasesClient.GetTestCaseResult(name);
```

### GetTestCaseResultAsync(GetTestCaseResultRequest, CallSettings)

    public virtual Task<TestCaseResult> GetTestCaseResultAsync(GetTestCaseResultRequest request, CallSettings callSettings = null)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetTestCaseResultRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCaseResult` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseResultRequest request = new GetTestCaseResultRequest
{
    TestCaseResultName = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]"),
};
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(request);
```

### GetTestCaseResultAsync(GetTestCaseResultRequest, CancellationToken)

    public virtual Task<TestCaseResult> GetTestCaseResultAsync(GetTestCaseResultRequest request, CancellationToken cancellationToken)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetTestCaseResultRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCaseResult` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseResultRequest request = new GetTestCaseResultRequest
{
    TestCaseResultName = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]"),
};
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(request);
```

### GetTestCaseResultAsync(TestCaseResultName, CallSettings)

    public virtual Task<TestCaseResult> GetTestCaseResultAsync(TestCaseResultName name, CallSettings callSettings = null)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `TestCaseResultName` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCaseResult` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseResultName name = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]");
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
```

### GetTestCaseResultAsync(TestCaseResultName, CancellationToken)

    public virtual Task<TestCaseResult> GetTestCaseResultAsync(TestCaseResultName name, CancellationToken cancellationToken)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `TestCaseResultName` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCaseResult` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseResultName name = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]");
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
```

### GetTestCaseResultAsync(string, CallSettings)

    public virtual Task<TestCaseResult> GetTestCaseResultAsync(string name, CallSettings callSettings = null)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCaseResult` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]/results/[RESULT]";
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
```

### GetTestCaseResultAsync(string, CancellationToken)

    public virtual Task<TestCaseResult> GetTestCaseResultAsync(string name, CancellationToken cancellationToken)

Gets a test case result.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCaseResult` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]/results/[RESULT]";
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
```

### ImportTestCases(ImportTestCasesRequest, CallSettings)

    public virtual Operation<ImportTestCasesResponse, ImportTestCasesMetadata> ImportTestCases(ImportTestCasesRequest request, CallSettings callSettings = null)

Imports the test cases from a Cloud Storage bucket or a local file. It
always creates new test cases and won't overwrite any existing ones. The
provided ID in the imported test case is neglected.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[ImportTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata\]
- `response`: \[ImportTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.ImportTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ImportTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationImportTestCasesResponseImportTestCasesMetadata` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
ImportTestCasesRequest request = new ImportTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    GcsUri = "",
};
// Make the request
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> response = testCasesClient.ImportTestCases(request);

// Poll until the returned long-running operation is complete
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportTestCasesResponse 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<ImportTestCasesResponse, ImportTestCasesMetadata> retrievedResponse = testCasesClient.PollOnceImportTestCases(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### ImportTestCasesAsync(ImportTestCasesRequest, CallSettings)

    public virtual Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> ImportTestCasesAsync(ImportTestCasesRequest request, CallSettings callSettings = null)

Imports the test cases from a Cloud Storage bucket or a local file. It
always creates new test cases and won't overwrite any existing ones. The
provided ID in the imported test case is neglected.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[ImportTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata\]
- `response`: \[ImportTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.ImportTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ImportTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationImportTestCasesResponseImportTestCasesMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ImportTestCasesRequest request = new ImportTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    GcsUri = "",
};
// Make the request
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> response = await testCasesClient.ImportTestCasesAsync(request);

// Poll until the returned long-running operation is complete
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportTestCasesResponse 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<ImportTestCasesResponse, ImportTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceImportTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### ImportTestCasesAsync(ImportTestCasesRequest, CancellationToken)

    public virtual Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> ImportTestCasesAsync(ImportTestCasesRequest request, CancellationToken cancellationToken)

Imports the test cases from a Cloud Storage bucket or a local file. It
always creates new test cases and won't overwrite any existing ones. The
provided ID in the imported test case is neglected.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[ImportTestCasesMetadata\]\[google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata\]
- `response`: \[ImportTestCasesResponse\]\[google.cloud.dialogflow.cx.v3.ImportTestCasesResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ImportTestCasesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationImportTestCasesResponseImportTestCasesMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ImportTestCasesRequest request = new ImportTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    GcsUri = "",
};
// Make the request
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> response = await testCasesClient.ImportTestCasesAsync(request);

// Poll until the returned long-running operation is complete
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportTestCasesResponse 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<ImportTestCasesResponse, ImportTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceImportTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ImportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
```

### ListTestCaseResults(ListTestCaseResultsRequest, CallSettings)

    public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(ListTestCaseResultsRequest request, CallSettings callSettings = null)

Fetches the list of run results for the given test case. A maximum of 100
results are kept for each test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListTestCaseResultsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTestCaseResultsResponseTestCaseResult` | A pageable sequence of [TestCaseResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCaseResult.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
ListTestCaseResultsRequest request = new ListTestCaseResultsRequest
{
    ParentAsTestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResults(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (TestCaseResult 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 (ListTestCaseResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCaseResult 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<TestCaseResult> 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 (TestCaseResult 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;
```

### ListTestCaseResults(TestCaseName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(TestCaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches the list of run results for the given test case. A maximum of 100
results are kept for each test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `TestCaseName` Required. The test case to list results for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTestCaseResultsResponseTestCaseResult` | A pageable sequence of [TestCaseResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCaseResult.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCaseName parent = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResults(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TestCaseResult 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 (ListTestCaseResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCaseResult 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<TestCaseResult> 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 (TestCaseResult 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;
```

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

    public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches the list of run results for the given test case. A maximum of 100
results are kept for each test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The test case to list results for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTestCaseResultsResponseTestCaseResult` | A pageable sequence of [TestCaseResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCaseResult.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResults(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TestCaseResult 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 (ListTestCaseResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCaseResult 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<TestCaseResult> 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 (TestCaseResult 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;
```

### ListTestCaseResultsAsync(ListTestCaseResultsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(ListTestCaseResultsRequest request, CallSettings callSettings = null)

Fetches the list of run results for the given test case. A maximum of 100
results are kept for each test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListTestCaseResultsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTestCaseResultsResponseTestCaseResult` | A pageable asynchronous sequence of [TestCaseResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCaseResult.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ListTestCaseResultsRequest request = new ListTestCaseResultsRequest
{
    ParentAsTestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResultsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (TestCaseResult 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 (ListTestCaseResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCaseResult 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<TestCaseResult> 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 (TestCaseResult 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;
```

### ListTestCaseResultsAsync(TestCaseName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(TestCaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches the list of run results for the given test case. A maximum of 100
results are kept for each test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `TestCaseName` Required. The test case to list results for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTestCaseResultsResponseTestCaseResult` | A pageable asynchronous sequence of [TestCaseResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCaseResult.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseName parent = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (TestCaseResult 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 (ListTestCaseResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCaseResult 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<TestCaseResult> 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 (TestCaseResult 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;
```

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

    public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches the list of run results for the given test case. A maximum of 100
results are kept for each test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The test case to list results for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTestCaseResultsResponseTestCaseResult` | A pageable asynchronous sequence of [TestCaseResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCaseResult.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (TestCaseResult 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 (ListTestCaseResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCaseResult 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<TestCaseResult> 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 (TestCaseResult 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;
```

### ListTestCases(AgentName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches a list of test cases for a given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to list all pages for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTestCasesResponseTestCase` | A pageable sequence of [TestCase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCase.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCases(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TestCase 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 (ListTestCasesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCase 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<TestCase> 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 (TestCase 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;
```

### ListTestCases(ListTestCasesRequest, CallSettings)

    public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(ListTestCasesRequest request, CallSettings callSettings = null)

Fetches a list of test cases for a given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTestCasesResponseTestCase` | A pageable sequence of [TestCase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCase.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
ListTestCasesRequest request = new ListTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    View = ListTestCasesRequest.Types.TestCaseView.Unspecified,
};
// Make the request
PagedEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCases(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (TestCase 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 (ListTestCasesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCase 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<TestCase> 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 (TestCase 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;
```

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

    public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches a list of test cases for a given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to list all pages for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListTestCasesResponseTestCase` | A pageable sequence of [TestCase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCase.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCases(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TestCase 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 (ListTestCasesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCase 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<TestCase> 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 (TestCase 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;
```

### ListTestCasesAsync(AgentName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches a list of test cases for a given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to list all pages for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTestCasesResponseTestCase` | A pageable asynchronous sequence of [TestCase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCase.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedAsyncEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCasesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (TestCase 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 (ListTestCasesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCase 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<TestCase> 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 (TestCase 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;
```

### ListTestCasesAsync(ListTestCasesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(ListTestCasesRequest request, CallSettings callSettings = null)

Fetches a list of test cases for a given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListTestCasesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTestCasesResponseTestCase` | A pageable asynchronous sequence of [TestCase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCase.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ListTestCasesRequest request = new ListTestCasesRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    View = ListTestCasesRequest.Types.TestCaseView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCasesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (TestCase 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 (ListTestCasesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCase 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<TestCase> 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 (TestCase 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;
```

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

    public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches a list of test cases for a given agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to list all pages for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListTestCasesResponseTestCase` | A pageable asynchronous sequence of [TestCase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCase.md.txt) resources. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedAsyncEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCasesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (TestCase 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 (ListTestCasesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TestCase 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<TestCase> 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 (TestCase 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;
```

### PollOnceBatchRunTestCases(string, CallSettings)

    public virtual Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> PollOnceBatchRunTestCases(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationBatchRunTestCasesResponseBatchRunTestCasesMetadata` | The result of polling the operation. |

### PollOnceBatchRunTestCasesAsync(string, CallSettings)

    public virtual Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> PollOnceBatchRunTestCasesAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationBatchRunTestCasesResponseBatchRunTestCasesMetadata` | A task representing the result of polling the operation. |

### PollOnceExportTestCases(string, CallSettings)

    public virtual Operation<ExportTestCasesResponse, ExportTestCasesMetadata> PollOnceExportTestCases(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationExportTestCasesResponseExportTestCasesMetadata` | The result of polling the operation. |

### PollOnceExportTestCasesAsync(string, CallSettings)

    public virtual Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> PollOnceExportTestCasesAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationExportTestCasesResponseExportTestCasesMetadata` | A task representing the result of polling the operation. |

### PollOnceImportTestCases(string, CallSettings)

    public virtual Operation<ImportTestCasesResponse, ImportTestCasesMetadata> PollOnceImportTestCases(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationImportTestCasesResponseImportTestCasesMetadata` | The result of polling the operation. |

### PollOnceImportTestCasesAsync(string, CallSettings)

    public virtual Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> PollOnceImportTestCasesAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationImportTestCasesResponseImportTestCasesMetadata` | A task representing the result of polling the operation. |

### PollOnceRunTestCase(string, CallSettings)

    public virtual Operation<RunTestCaseResponse, RunTestCaseMetadata> PollOnceRunTestCase(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationRunTestCaseResponseRunTestCaseMetadata` | The result of polling the operation. |

### PollOnceRunTestCaseAsync(string, CallSettings)

    public virtual Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>> PollOnceRunTestCaseAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationRunTestCaseResponseRunTestCaseMetadata` | A task representing the result of polling the operation. |

### RunTestCase(RunTestCaseRequest, CallSettings)

    public virtual Operation<RunTestCaseResponse, RunTestCaseMetadata> RunTestCase(RunTestCaseRequest request, CallSettings callSettings = null)

Kicks off a test case run.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[RunTestCaseMetadata\]\[google.cloud.dialogflow.cx.v3.RunTestCaseMetadata\]
- `response`: \[RunTestCaseResponse\]\[google.cloud.dialogflow.cx.v3.RunTestCaseResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `RunTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationRunTestCaseResponseRunTestCaseMetadata` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
RunTestCaseRequest request = new RunTestCaseRequest
{
    TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
Operation<RunTestCaseResponse, RunTestCaseMetadata> response = testCasesClient.RunTestCase(request);

// Poll until the returned long-running operation is complete
Operation<RunTestCaseResponse, RunTestCaseMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RunTestCaseResponse 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<RunTestCaseResponse, RunTestCaseMetadata> retrievedResponse = testCasesClient.PollOnceRunTestCase(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    RunTestCaseResponse retrievedResult = retrievedResponse.Result;
}
```

### RunTestCaseAsync(RunTestCaseRequest, CallSettings)

    public virtual Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>> RunTestCaseAsync(RunTestCaseRequest request, CallSettings callSettings = null)

Kicks off a test case run.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[RunTestCaseMetadata\]\[google.cloud.dialogflow.cx.v3.RunTestCaseMetadata\]
- `response`: \[RunTestCaseResponse\]\[google.cloud.dialogflow.cx.v3.RunTestCaseResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `RunTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationRunTestCaseResponseRunTestCaseMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
RunTestCaseRequest request = new RunTestCaseRequest
{
    TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
Operation<RunTestCaseResponse, RunTestCaseMetadata> response = await testCasesClient.RunTestCaseAsync(request);

// Poll until the returned long-running operation is complete
Operation<RunTestCaseResponse, RunTestCaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RunTestCaseResponse 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<RunTestCaseResponse, RunTestCaseMetadata> retrievedResponse = await testCasesClient.PollOnceRunTestCaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    RunTestCaseResponse retrievedResult = retrievedResponse.Result;
}
```

### RunTestCaseAsync(RunTestCaseRequest, CancellationToken)

    public virtual Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>> RunTestCaseAsync(RunTestCaseRequest request, CancellationToken cancellationToken)

Kicks off a test case run.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[RunTestCaseMetadata\]\[google.cloud.dialogflow.cx.v3.RunTestCaseMetadata\]
- `response`: \[RunTestCaseResponse\]\[google.cloud.dialogflow.cx.v3.RunTestCaseResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `RunTestCaseRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationRunTestCaseResponseRunTestCaseMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
RunTestCaseRequest request = new RunTestCaseRequest
{
    TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
    EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
Operation<RunTestCaseResponse, RunTestCaseMetadata> response = await testCasesClient.RunTestCaseAsync(request);

// Poll until the returned long-running operation is complete
Operation<RunTestCaseResponse, RunTestCaseMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RunTestCaseResponse 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<RunTestCaseResponse, RunTestCaseMetadata> retrievedResponse = await testCasesClient.PollOnceRunTestCaseAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    RunTestCaseResponse retrievedResult = retrievedResponse.Result;
}
```

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_TestCasesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_TestCasesClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `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.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_TestCasesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.TestCasesClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_TestCasesClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateTestCase(TestCase, FieldMask, CallSettings)

    public virtual TestCase UpdateTestCase(TestCase testCase, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `testCase` | `TestCase` Required. The test case to update. |
| `updateMask` | `FieldMask` Required. The mask to specify which fields should be updated. The \[`creationTime`\]\[google.cloud.dialogflow.cx.v3.TestCase.creation_time\] and \[`lastTestResult`\]\[google.cloud.dialogflow.cx.v3.TestCase.last_test_result\] cannot be updated. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCase testCase = new TestCase();
FieldMask updateMask = new FieldMask();
// Make the request
TestCase response = testCasesClient.UpdateTestCase(testCase, updateMask);
```

### UpdateTestCase(UpdateTestCaseRequest, CallSettings)

    public virtual TestCase UpdateTestCase(UpdateTestCaseRequest request, CallSettings callSettings = null)

Updates the specified test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TestCase` | The RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
UpdateTestCaseRequest request = new UpdateTestCaseRequest
{
    TestCase = new TestCase(),
    UpdateMask = new FieldMask(),
};
// Make the request
TestCase response = testCasesClient.UpdateTestCase(request);
```

### UpdateTestCaseAsync(TestCase, FieldMask, CallSettings)

    public virtual Task<TestCase> UpdateTestCaseAsync(TestCase testCase, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `testCase` | `TestCase` Required. The test case to update. |
| `updateMask` | `FieldMask` Required. The mask to specify which fields should be updated. The \[`creationTime`\]\[google.cloud.dialogflow.cx.v3.TestCase.creation_time\] and \[`lastTestResult`\]\[google.cloud.dialogflow.cx.v3.TestCase.last_test_result\] cannot be updated. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCase testCase = new TestCase();
FieldMask updateMask = new FieldMask();
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(testCase, updateMask);
```

### UpdateTestCaseAsync(TestCase, FieldMask, CancellationToken)

    public virtual Task<TestCase> UpdateTestCaseAsync(TestCase testCase, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `testCase` | `TestCase` Required. The test case to update. |
| `updateMask` | `FieldMask` Required. The mask to specify which fields should be updated. The \[`creationTime`\]\[google.cloud.dialogflow.cx.v3.TestCase.creation_time\] and \[`lastTestResult`\]\[google.cloud.dialogflow.cx.v3.TestCase.last_test_result\] cannot be updated. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCase testCase = new TestCase();
FieldMask updateMask = new FieldMask();
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(testCase, updateMask);
```

### UpdateTestCaseAsync(UpdateTestCaseRequest, CallSettings)

    public virtual Task<TestCase> UpdateTestCaseAsync(UpdateTestCaseRequest request, CallSettings callSettings = null)

Updates the specified test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateTestCaseRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
UpdateTestCaseRequest request = new UpdateTestCaseRequest
{
    TestCase = new TestCase(),
    UpdateMask = new FieldMask(),
};
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(request);
```

### UpdateTestCaseAsync(UpdateTestCaseRequest, CancellationToken)

    public virtual Task<TestCase> UpdateTestCaseAsync(UpdateTestCaseRequest request, CancellationToken cancellationToken)

Updates the specified test case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateTestCaseRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskTestCase` | A Task containing the RPC response. |

**Example**

```cs
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
UpdateTestCaseRequest request = new UpdateTestCaseRequest
{
    TestCase = new TestCase(),
    UpdateMask = new FieldMask(),
};
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(request);
```