Dialogflow v3 API - Class TestCasesClient (2.2.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 > TestCasesClient

Derived Types

Namespace

Google.Cloud.Dialogflow.Cx.V3

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
TypeDescription
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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default TestCases scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

ExportTestCasesOperationsClient

public virtual OperationsClient ExportTestCasesOperationsClient { get; }

The long-running operations client for ExportTestCases.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual TestCases.TestCasesClient GrpcClient { get; }

The underlying gRPC TestCases client

Property Value
TypeDescription
TestCases.TestCasesClient

ImportTestCasesOperationsClient

public virtual OperationsClient ImportTestCasesOperationsClient { get; }

The long-running operations client for ImportTestCases.

Property Value
TypeDescription
OperationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

RunTestCaseOperationsClient

public virtual OperationsClient RunTestCaseOperationsClient { get; }

The long-running operations client for RunTestCase.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

BatchDeleteTestCases(AgentName, CallSettings)

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

Batch deletes test cases.

Parameters
NameDescription
parentAgentName

Required. The agent to delete test cases from. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
requestBatchDeleteTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
parentString

Required. The agent to delete test cases from. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
parentAgentName

Required. The agent to delete test cases from. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
parentAgentName

Required. The agent to delete test cases from. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestBatchDeleteTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestBatchDeleteTestCasesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The agent to delete test cases from. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The agent to delete test cases from. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestBatchRunTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>

The RPC response.

Example
// 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. 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
NameDescription
requestBatchRunTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>>

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestBatchRunTestCasesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCalculateCoverageRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CalculateCoverageResponse

The RPC response.

Example
// 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
NameDescription
requestCalculateCoverageRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CalculateCoverageResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCalculateCoverageRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CalculateCoverageResponse>

A Task containing the RPC response.

Example
// 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 using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TestCasesClientBuilder.

Returns
TypeDescription
TestCasesClient

The created TestCasesClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a TestCasesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TestCasesClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<TestCasesClient>

The task representing the created TestCasesClient.

CreateTestCase(AgentName, TestCase, CallSettings)

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

Creates a test case for the given agent.

Parameters
NameDescription
parentAgentName

Required. The agent to create the test case for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

testCaseTestCase

Required. The test case to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
requestCreateTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
parentString

Required. The agent to create the test case for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

testCaseTestCase

Required. The test case to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
parentAgentName

Required. The agent to create the test case for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

testCaseTestCase

Required. The test case to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
parentAgentName

Required. The agent to create the test case for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

testCaseTestCase

Required. The test case to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateTestCaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The agent to create the test case for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

testCaseTestCase

Required. The test case to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The agent to create the test case for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

testCaseTestCase

Required. The test case to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestExportTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportTestCasesResponse, ExportTestCasesMetadata>

The RPC response.

Example
// 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. 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
NameDescription
requestExportTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>>

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestExportTestCasesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
nameTestCaseName

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
nameString

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
requestGetTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetTestCaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
nameTestCaseName

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
nameTestCaseName

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetTestCaseResultRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCaseResult

The RPC response.

Example
// 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
NameDescription
nameTestCaseResultName

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>/results/&lt;TestCaseResult ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCaseResult

The RPC response.

Example
// 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
NameDescription
nameString

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>/results/&lt;TestCaseResult ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCaseResult

The RPC response.

Example
// 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
NameDescription
requestGetTestCaseResultRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCaseResult>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetTestCaseResultRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCaseResult>

A Task containing the RPC response.

Example
// 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
NameDescription
nameTestCaseResultName

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>/results/&lt;TestCaseResult ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCaseResult>

A Task containing the RPC response.

Example
// 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
NameDescription
nameTestCaseResultName

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>/results/&lt;TestCaseResult ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCaseResult>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>/results/&lt;TestCaseResult ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCaseResult>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The name of the testcase. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/testCases/&lt;TestCase ID>/results/&lt;TestCaseResult ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCaseResult>

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestImportTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ImportTestCasesResponse, ImportTestCasesMetadata>

The RPC response.

Example
// 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. 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
NameDescription
requestImportTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>>

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestImportTestCasesRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>>

A Task containing the RPC response.

Example
// 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 a list of results for a given test case.

Parameters
NameDescription
requestListTestCaseResultsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult>

A pageable sequence of TestCaseResult resources.

Example
// 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, Nullable<Int32>, CallSettings)

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

Fetches a list of results for a given test case.

Parameters
NameDescription
parentTestCaseName

Required. The test case to list results for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/ testCases/&lt;TestCase ID>. Specify a - as a wildcard for TestCase ID to list results across multiple test cases.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult>

A pageable sequence of TestCaseResult resources.

Example
// 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, Nullable<Int32>, CallSettings)

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

Fetches a list of results for a given test case.

Parameters
NameDescription
parentString

Required. The test case to list results for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/ testCases/&lt;TestCase ID>. Specify a - as a wildcard for TestCase ID to list results across multiple test cases.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult>

A pageable sequence of TestCaseResult resources.

Example
// 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 a list of results for a given test case.

Parameters
NameDescription
requestListTestCaseResultsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult>

A pageable asynchronous sequence of TestCaseResult resources.

Example
// 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 response.ForEachAsync((TestCaseResult item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTestCaseResultsResponse page) =>
{
    // 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, Nullable<Int32>, CallSettings)

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

Fetches a list of results for a given test case.

Parameters
NameDescription
parentTestCaseName

Required. The test case to list results for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/ testCases/&lt;TestCase ID>. Specify a - as a wildcard for TestCase ID to list results across multiple test cases.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult>

A pageable asynchronous sequence of TestCaseResult resources.

Example
// 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 response.ForEachAsync((TestCaseResult item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTestCaseResultsResponse page) =>
{
    // 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, Nullable<Int32>, CallSettings)

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

Fetches a list of results for a given test case.

Parameters
NameDescription
parentString

Required. The test case to list results for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>/ testCases/&lt;TestCase ID>. Specify a - as a wildcard for TestCase ID to list results across multiple test cases.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult>

A pageable asynchronous sequence of TestCaseResult resources.

Example
// 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 response.ForEachAsync((TestCaseResult item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTestCaseResultsResponse page) =>
{
    // 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, Nullable<Int32>, 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
NameDescription
parentAgentName

Required. The agent to list all pages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTestCasesResponse, TestCase>

A pageable sequence of TestCase resources.

Example
// 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
NameDescription
requestListTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTestCasesResponse, TestCase>

A pageable sequence of TestCase resources.

Example
// 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, Nullable<Int32>, 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
NameDescription
parentString

Required. The agent to list all pages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTestCasesResponse, TestCase>

A pageable sequence of TestCase resources.

Example
// 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, Nullable<Int32>, 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
NameDescription
parentAgentName

Required. The agent to list all pages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTestCasesResponse, TestCase>

A pageable asynchronous sequence of TestCase resources.

Example
// 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 response.ForEachAsync((TestCase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTestCasesResponse page) =>
{
    // 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
NameDescription
requestListTestCasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTestCasesResponse, TestCase>

A pageable asynchronous sequence of TestCase resources.

Example
// 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 response.ForEachAsync((TestCase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTestCasesResponse page) =>
{
    // 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, Nullable<Int32>, 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
NameDescription
parentString

Required. The agent to list all pages for. Format: projects/&lt;Project ID>/locations/&lt;Location ID>/agents/&lt;Agent ID>.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTestCasesResponse, TestCase>

A pageable asynchronous sequence of TestCase resources.

Example
// 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 response.ForEachAsync((TestCase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTestCasesResponse page) =>
{
    // 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportTestCasesResponse, ExportTestCasesMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ImportTestCasesResponse, ImportTestCasesMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RunTestCaseResponse, RunTestCaseMetadata>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>>

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. 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
NameDescription
requestRunTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RunTestCaseResponse, RunTestCaseMetadata>

The RPC response.

Example
// 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. 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
NameDescription
requestRunTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>>

A Task containing the RPC response.

Example
// 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. 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
NameDescription
requestRunTestCaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>>

A Task containing the RPC response.

Example
// 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(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
NameDescription
testCaseTestCase

Required. The test case to update.

updateMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
requestUpdateTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestCase

The RPC response.

Example
// 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
NameDescription
testCaseTestCase

Required. The test case to update.

updateMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
testCaseTestCase

Required. The test case to update.

updateMaskFieldMask

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateTestCaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateTestCaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestCase>

A Task containing the RPC response.

Example
// 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);