public abstract class TestCasesClient
Reference documentation and code samples for the Dialogflow v3 API class TestCasesClient.
TestCases client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dialogflow.Cx.V3Assembly
Google.Cloud.Dialogflow.Cx.V3.dll
Remarks
Service for managing [Test Cases][google.cloud.dialogflow.cx.v3.TestCase] and [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
Properties
BatchRunTestCasesOperationsClient
public virtual OperationsClient BatchRunTestCasesOperationsClient { get; }
The long-running operations client for BatchRunTestCases
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the TestCases service, which is a host of "dialogflow.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default TestCases scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default TestCases scopes are:
ExportTestCasesOperationsClient
public virtual OperationsClient ExportTestCasesOperationsClient { get; }
The long-running operations client for ExportTestCases
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual TestCases.TestCasesClient GrpcClient { get; }
The underlying gRPC TestCases client
Property Value | |
---|---|
Type | Description |
TestCasesTestCasesClient |
ImportTestCasesOperationsClient
public virtual OperationsClient ImportTestCasesOperationsClient { get; }
The long-running operations client for ImportTestCases
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RunTestCaseOperationsClient
public virtual OperationsClient RunTestCaseOperationsClient { get; }
The long-running operations client for RunTestCase
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
BatchDeleteTestCases(AgentName, CallSettings)
public virtual void BatchDeleteTestCases(AgentName parent, CallSettings callSettings = null)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to delete test cases from.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
testCasesClient.BatchDeleteTestCases(parent);
BatchDeleteTestCases(BatchDeleteTestCasesRequest, CallSettings)
public virtual void BatchDeleteTestCases(BatchDeleteTestCasesRequest request, CallSettings callSettings = null)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
request |
BatchDeleteTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
BatchDeleteTestCasesRequest request = new BatchDeleteTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
TestCaseNames =
{
TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
},
};
// Make the request
testCasesClient.BatchDeleteTestCases(request);
BatchDeleteTestCases(string, CallSettings)
public virtual void BatchDeleteTestCases(string parent, CallSettings callSettings = null)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to delete test cases from.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
testCasesClient.BatchDeleteTestCases(parent);
BatchDeleteTestCasesAsync(AgentName, CallSettings)
public virtual Task BatchDeleteTestCasesAsync(AgentName parent, CallSettings callSettings = null)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to delete test cases from.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
BatchDeleteTestCasesAsync(AgentName, CancellationToken)
public virtual Task BatchDeleteTestCasesAsync(AgentName parent, CancellationToken cancellationToken)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to delete test cases from.
Format: |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest, CallSettings)
public virtual Task BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest request, CallSettings callSettings = null)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
request |
BatchDeleteTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteTestCasesRequest request = new BatchDeleteTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
TestCaseNames =
{
TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
},
};
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(request);
BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest, CancellationToken)
public virtual Task BatchDeleteTestCasesAsync(BatchDeleteTestCasesRequest request, CancellationToken cancellationToken)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
request |
BatchDeleteTestCasesRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteTestCasesRequest request = new BatchDeleteTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
TestCaseNames =
{
TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
},
};
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(request);
BatchDeleteTestCasesAsync(string, CallSettings)
public virtual Task BatchDeleteTestCasesAsync(string parent, CallSettings callSettings = null)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to delete test cases from.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
await testCasesClient.BatchDeleteTestCasesAsync(parent);
BatchDeleteTestCasesAsync(string, CancellationToken)
public virtual Task BatchDeleteTestCasesAsync(string parent, CancellationToken cancellationToken)
Batch deletes test cases.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to delete test cases from.
Format: |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
BatchRunTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchRunTestCasesResponseBatchRunTestCasesMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
BatchRunTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchRunTestCasesResponseBatchRunTestCasesMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
BatchRunTestCasesRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchRunTestCasesResponseBatchRunTestCasesMetadata |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
BatchRunTestCasesRequest request = new BatchRunTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
EnvironmentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
TestCasesAsTestCaseNames =
{
TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
},
};
// Make the request
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> response = await testCasesClient.BatchRunTestCasesAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchRunTestCasesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceBatchRunTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchRunTestCasesResponse retrievedResult = retrievedResponse.Result;
}
CalculateCoverage(CalculateCoverageRequest, CallSettings)
public virtual CalculateCoverageResponse CalculateCoverage(CalculateCoverageRequest request, CallSettings callSettings = null)
Calculates the test coverage for an agent.
Parameters | |
---|---|
Name | Description |
request |
CalculateCoverageRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CalculateCoverageResponse |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
CalculateCoverageRequest request = new CalculateCoverageRequest
{
Type = CalculateCoverageRequest.Types.CoverageType.Unspecified,
AgentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
CalculateCoverageResponse response = testCasesClient.CalculateCoverage(request);
CalculateCoverageAsync(CalculateCoverageRequest, CallSettings)
public virtual Task<CalculateCoverageResponse> CalculateCoverageAsync(CalculateCoverageRequest request, CallSettings callSettings = null)
Calculates the test coverage for an agent.
Parameters | |
---|---|
Name | Description |
request |
CalculateCoverageRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCalculateCoverageResponse |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CalculateCoverageRequest request = new CalculateCoverageRequest
{
Type = CalculateCoverageRequest.Types.CoverageType.Unspecified,
AgentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
CalculateCoverageResponse response = await testCasesClient.CalculateCoverageAsync(request);
CalculateCoverageAsync(CalculateCoverageRequest, CancellationToken)
public virtual Task<CalculateCoverageResponse> CalculateCoverageAsync(CalculateCoverageRequest request, CancellationToken cancellationToken)
Calculates the test coverage for an agent.
Parameters | |
---|---|
Name | Description |
request |
CalculateCoverageRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskCalculateCoverageResponse |
A Task containing the RPC response. |
// 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 | |
---|---|
Type | Description |
TestCasesClient |
The created TestCasesClient. |
CreateAsync(CancellationToken)
public static Task<TestCasesClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a TestCasesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TestCasesClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskTestCasesClient |
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 | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to create the test case for.
Format: |
testCase |
TestCase Required. The test case to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
TestCase testCase = new TestCase();
// Make the request
TestCase response = testCasesClient.CreateTestCase(parent, testCase);
CreateTestCase(CreateTestCaseRequest, CallSettings)
public virtual TestCase CreateTestCase(CreateTestCaseRequest request, CallSettings callSettings = null)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
request |
CreateTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
CreateTestCaseRequest request = new CreateTestCaseRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
TestCase = new TestCase(),
};
// Make the request
TestCase response = testCasesClient.CreateTestCase(request);
CreateTestCase(string, TestCase, CallSettings)
public virtual TestCase CreateTestCase(string parent, TestCase testCase, CallSettings callSettings = null)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to create the test case for.
Format: |
testCase |
TestCase Required. The test case to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
TestCase testCase = new TestCase();
// Make the request
TestCase response = testCasesClient.CreateTestCase(parent, testCase);
CreateTestCaseAsync(AgentName, TestCase, CallSettings)
public virtual Task<TestCase> CreateTestCaseAsync(AgentName parent, TestCase testCase, CallSettings callSettings = null)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to create the test case for.
Format: |
testCase |
TestCase Required. The test case to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
CreateTestCaseAsync(AgentName, TestCase, CancellationToken)
public virtual Task<TestCase> CreateTestCaseAsync(AgentName parent, TestCase testCase, CancellationToken cancellationToken)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to create the test case for.
Format: |
testCase |
TestCase Required. The test case to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
CreateTestCaseAsync(CreateTestCaseRequest, CallSettings)
public virtual Task<TestCase> CreateTestCaseAsync(CreateTestCaseRequest request, CallSettings callSettings = null)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
request |
CreateTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CreateTestCaseRequest request = new CreateTestCaseRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
TestCase = new TestCase(),
};
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(request);
CreateTestCaseAsync(CreateTestCaseRequest, CancellationToken)
public virtual Task<TestCase> CreateTestCaseAsync(CreateTestCaseRequest request, CancellationToken cancellationToken)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
request |
CreateTestCaseRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
CreateTestCaseRequest request = new CreateTestCaseRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
TestCase = new TestCase(),
};
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(request);
CreateTestCaseAsync(string, TestCase, CallSettings)
public virtual Task<TestCase> CreateTestCaseAsync(string parent, TestCase testCase, CallSettings callSettings = null)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to create the test case for.
Format: |
testCase |
TestCase Required. The test case to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
TestCase testCase = new TestCase();
// Make the request
TestCase response = await testCasesClient.CreateTestCaseAsync(parent, testCase);
CreateTestCaseAsync(string, TestCase, CancellationToken)
public virtual Task<TestCase> CreateTestCaseAsync(string parent, TestCase testCase, CancellationToken cancellationToken)
Creates a test case for the given agent.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to create the test case for.
Format: |
testCase |
TestCase Required. The test case to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ExportTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportTestCasesResponseExportTestCasesMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ExportTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportTestCasesResponseExportTestCasesMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ExportTestCasesRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportTestCasesResponseExportTestCasesMetadata |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ExportTestCasesRequest request = new ExportTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
GcsUri = "",
DataFormat = ExportTestCasesRequest.Types.DataFormat.Unspecified,
Filter = "",
};
// Make the request
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> response = await testCasesClient.ExportTestCasesAsync(request);
// Poll until the returned long-running operation is complete
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportTestCasesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceExportTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ExportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
GetTestCase(GetTestCaseRequest, CallSettings)
public virtual TestCase GetTestCase(GetTestCaseRequest request, CallSettings callSettings = null)
Gets a test case.
Parameters | |
---|---|
Name | Description |
request |
GetTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
GetTestCaseRequest request = new GetTestCaseRequest
{
TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
};
// Make the request
TestCase response = testCasesClient.GetTestCase(request);
GetTestCase(TestCaseName, CallSettings)
public virtual TestCase GetTestCase(TestCaseName name, CallSettings callSettings = null)
Gets a test case.
Parameters | |
---|---|
Name | Description |
name |
TestCaseName Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCaseName name = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
TestCase response = testCasesClient.GetTestCase(name);
GetTestCase(string, CallSettings)
public virtual TestCase GetTestCase(string name, CallSettings callSettings = null)
Gets a test case.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
TestCase response = testCasesClient.GetTestCase(name);
GetTestCaseAsync(GetTestCaseRequest, CallSettings)
public virtual Task<TestCase> GetTestCaseAsync(GetTestCaseRequest request, CallSettings callSettings = null)
Gets a test case.
Parameters | |
---|---|
Name | Description |
request |
GetTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseRequest request = new GetTestCaseRequest
{
TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
};
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(request);
GetTestCaseAsync(GetTestCaseRequest, CancellationToken)
public virtual Task<TestCase> GetTestCaseAsync(GetTestCaseRequest request, CancellationToken cancellationToken)
Gets a test case.
Parameters | |
---|---|
Name | Description |
request |
GetTestCaseRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseRequest request = new GetTestCaseRequest
{
TestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
};
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(request);
GetTestCaseAsync(TestCaseName, CallSettings)
public virtual Task<TestCase> GetTestCaseAsync(TestCaseName name, CallSettings callSettings = null)
Gets a test case.
Parameters | |
---|---|
Name | Description |
name |
TestCaseName Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseName name = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
GetTestCaseAsync(TestCaseName, CancellationToken)
public virtual Task<TestCase> GetTestCaseAsync(TestCaseName name, CancellationToken cancellationToken)
Gets a test case.
Parameters | |
---|---|
Name | Description |
name |
TestCaseName Required. The name of the testcase.
Format: |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseName name = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
GetTestCaseAsync(string, CallSettings)
public virtual Task<TestCase> GetTestCaseAsync(string name, CallSettings callSettings = null)
Gets a test case.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
GetTestCaseAsync(string, CancellationToken)
public virtual Task<TestCase> GetTestCaseAsync(string name, CancellationToken cancellationToken)
Gets a test case.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the testcase.
Format: |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
TestCase response = await testCasesClient.GetTestCaseAsync(name);
GetTestCaseResult(GetTestCaseResultRequest, CallSettings)
public virtual TestCaseResult GetTestCaseResult(GetTestCaseResultRequest request, CallSettings callSettings = null)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
request |
GetTestCaseResultRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCaseResult |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
GetTestCaseResultRequest request = new GetTestCaseResultRequest
{
TestCaseResultName = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]"),
};
// Make the request
TestCaseResult response = testCasesClient.GetTestCaseResult(request);
GetTestCaseResult(TestCaseResultName, CallSettings)
public virtual TestCaseResult GetTestCaseResult(TestCaseResultName name, CallSettings callSettings = null)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
name |
TestCaseResultName Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCaseResult |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCaseResultName name = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]");
// Make the request
TestCaseResult response = testCasesClient.GetTestCaseResult(name);
GetTestCaseResult(string, CallSettings)
public virtual TestCaseResult GetTestCaseResult(string name, CallSettings callSettings = null)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCaseResult |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]/results/[RESULT]";
// Make the request
TestCaseResult response = testCasesClient.GetTestCaseResult(name);
GetTestCaseResultAsync(GetTestCaseResultRequest, CallSettings)
public virtual Task<TestCaseResult> GetTestCaseResultAsync(GetTestCaseResultRequest request, CallSettings callSettings = null)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
request |
GetTestCaseResultRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCaseResult |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseResultRequest request = new GetTestCaseResultRequest
{
TestCaseResultName = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]"),
};
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(request);
GetTestCaseResultAsync(GetTestCaseResultRequest, CancellationToken)
public virtual Task<TestCaseResult> GetTestCaseResultAsync(GetTestCaseResultRequest request, CancellationToken cancellationToken)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
request |
GetTestCaseResultRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCaseResult |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
GetTestCaseResultRequest request = new GetTestCaseResultRequest
{
TestCaseResultName = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]"),
};
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(request);
GetTestCaseResultAsync(TestCaseResultName, CallSettings)
public virtual Task<TestCaseResult> GetTestCaseResultAsync(TestCaseResultName name, CallSettings callSettings = null)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
name |
TestCaseResultName Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCaseResult |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseResultName name = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]");
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
GetTestCaseResultAsync(TestCaseResultName, CancellationToken)
public virtual Task<TestCaseResult> GetTestCaseResultAsync(TestCaseResultName name, CancellationToken cancellationToken)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
name |
TestCaseResultName Required. The name of the testcase.
Format: |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCaseResult |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCaseResultName name = TestCaseResultName.FromProjectLocationAgentTestCaseResult("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]", "[RESULT]");
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
GetTestCaseResultAsync(string, CallSettings)
public virtual Task<TestCaseResult> GetTestCaseResultAsync(string name, CallSettings callSettings = null)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the testcase.
Format: |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCaseResult |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]/results/[RESULT]";
// Make the request
TestCaseResult response = await testCasesClient.GetTestCaseResultAsync(name);
GetTestCaseResultAsync(string, CancellationToken)
public virtual Task<TestCaseResult> GetTestCaseResultAsync(string name, CancellationToken cancellationToken)
Gets a test case result.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the testcase.
Format: |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCaseResult |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ImportTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportTestCasesResponseImportTestCasesMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ImportTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportTestCasesResponseImportTestCasesMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ImportTestCasesRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportTestCasesResponseImportTestCasesMetadata |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
ImportTestCasesRequest request = new ImportTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
GcsUri = "",
};
// Make the request
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> response = await testCasesClient.ImportTestCasesAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportTestCasesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> retrievedResponse = await testCasesClient.PollOnceImportTestCasesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportTestCasesResponse retrievedResult = retrievedResponse.Result;
}
ListTestCaseResults(ListTestCaseResultsRequest, CallSettings)
public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(ListTestCaseResultsRequest request, CallSettings callSettings = null)
Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.
Parameters | |
---|---|
Name | Description |
request |
ListTestCaseResultsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTestCaseResultsResponseTestCaseResult |
A pageable sequence of TestCaseResult resources. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
ListTestCaseResultsRequest request = new ListTestCaseResultsRequest
{
ParentAsTestCaseName = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResults(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (TestCaseResult item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTestCaseResultsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TestCaseResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TestCaseResult> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TestCaseResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTestCaseResults(TestCaseName, string, int?, CallSettings)
public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(TestCaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.
Parameters | |
---|---|
Name | Description |
parent |
TestCaseName Required. The test case to list results for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTestCaseResultsResponseTestCaseResult |
A pageable sequence of TestCaseResult resources. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCaseName parent = TestCaseName.FromProjectLocationAgentTestCase("[PROJECT]", "[LOCATION]", "[AGENT]", "[TEST_CASE]");
// Make the request
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResults(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TestCaseResult item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTestCaseResultsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TestCaseResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TestCaseResult> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TestCaseResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTestCaseResults(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The test case to list results for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTestCaseResultsResponseTestCaseResult |
A pageable sequence of TestCaseResult resources. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/testCases/[TEST_CASE]";
// Make the request
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> response = testCasesClient.ListTestCaseResults(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TestCaseResult item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTestCaseResultsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TestCaseResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TestCaseResult> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TestCaseResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTestCaseResultsAsync(ListTestCaseResultsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(ListTestCaseResultsRequest request, CallSettings callSettings = null)
Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.
Parameters | |
---|---|
Name | Description |
request |
ListTestCaseResultsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTestCaseResultsResponseTestCaseResult |
A pageable asynchronous sequence of TestCaseResult resources. |
// 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, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(TestCaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.
Parameters | |
---|---|
Name | Description |
parent |
TestCaseName Required. The test case to list results for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTestCaseResultsResponseTestCaseResult |
A pageable asynchronous sequence of TestCaseResult resources. |
// 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, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches the list of run results for the given test case. A maximum of 100 results are kept for each test case.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The test case to list results for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTestCaseResultsResponseTestCaseResult |
A pageable asynchronous sequence of TestCaseResult resources. |
// 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, int?, CallSettings)
public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to list all pages for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTestCasesResponseTestCase |
A pageable sequence of TestCase resources. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCases(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TestCase item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTestCasesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TestCase item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TestCase> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TestCase item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTestCases(ListTestCasesRequest, CallSettings)
public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(ListTestCasesRequest request, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
Parameters | |
---|---|
Name | Description |
request |
ListTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTestCasesResponseTestCase |
A pageable sequence of TestCase resources. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
ListTestCasesRequest request = new ListTestCasesRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
View = ListTestCasesRequest.Types.TestCaseView.Unspecified,
};
// Make the request
PagedEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCases(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (TestCase item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTestCasesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TestCase item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TestCase> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TestCase item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTestCases(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to list all pages for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListTestCasesResponseTestCase |
A pageable sequence of TestCase resources. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedEnumerable<ListTestCasesResponse, TestCase> response = testCasesClient.ListTestCases(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (TestCase item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTestCasesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (TestCase item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TestCase> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TestCase item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTestCasesAsync(AgentName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
Parameters | |
---|---|
Name | Description |
parent |
AgentName Required. The agent to list all pages for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTestCasesResponseTestCase |
A pageable asynchronous sequence of TestCase resources. |
// 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 | |
---|---|
Name | Description |
request |
ListTestCasesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTestCasesResponseTestCase |
A pageable asynchronous sequence of TestCase resources. |
// 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, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The agent to list all pages for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListTestCasesResponseTestCase |
A pageable asynchronous sequence of TestCase resources. |
// 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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchRunTestCasesResponseBatchRunTestCasesMetadata |
The result of polling the operation. |
PollOnceBatchRunTestCasesAsync(string, CallSettings)
public virtual Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> PollOnceBatchRunTestCasesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchRunTestCases
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchRunTestCasesResponseBatchRunTestCasesMetadata |
A task representing the result of polling the operation. |
PollOnceExportTestCases(string, CallSettings)
public virtual Operation<ExportTestCasesResponse, ExportTestCasesMetadata> PollOnceExportTestCases(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ExportTestCases
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportTestCasesResponseExportTestCasesMetadata |
The result of polling the operation. |
PollOnceExportTestCasesAsync(string, CallSettings)
public virtual Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> PollOnceExportTestCasesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportTestCases
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportTestCasesResponseExportTestCasesMetadata |
A task representing the result of polling the operation. |
PollOnceImportTestCases(string, CallSettings)
public virtual Operation<ImportTestCasesResponse, ImportTestCasesMetadata> PollOnceImportTestCases(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ImportTestCases
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportTestCasesResponseImportTestCasesMetadata |
The result of polling the operation. |
PollOnceImportTestCasesAsync(string, CallSettings)
public virtual Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> PollOnceImportTestCasesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportTestCases
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportTestCasesResponseImportTestCasesMetadata |
A task representing the result of polling the operation. |
PollOnceRunTestCase(string, CallSettings)
public virtual Operation<RunTestCaseResponse, RunTestCaseMetadata> PollOnceRunTestCase(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of RunTestCase
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRunTestCaseResponseRunTestCaseMetadata |
The result of polling the operation. |
PollOnceRunTestCaseAsync(string, CallSettings)
public virtual Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>> PollOnceRunTestCaseAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RunTestCase
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRunTestCaseResponseRunTestCaseMetadata |
A task representing the result of polling the operation. |
RunTestCase(RunTestCaseRequest, CallSettings)
public virtual Operation<RunTestCaseResponse, RunTestCaseMetadata> RunTestCase(RunTestCaseRequest request, CallSettings callSettings = null)
Kicks off a test case run.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3.RunTestCaseMetadata]response
: [RunTestCaseResponse][google.cloud.dialogflow.cx.v3.RunTestCaseResponse]
Parameters | |
---|---|
Name | Description |
request |
RunTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRunTestCaseResponseRunTestCaseMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
RunTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRunTestCaseResponseRunTestCaseMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
RunTestCaseRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationRunTestCaseResponseRunTestCaseMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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 | |
---|---|
Name | Description |
testCase |
TestCase Required. The test case to update. |
updateMask |
FieldMask Required. The mask to specify which fields should be updated. The
[ |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
TestCase testCase = new TestCase();
FieldMask updateMask = new FieldMask();
// Make the request
TestCase response = testCasesClient.UpdateTestCase(testCase, updateMask);
UpdateTestCase(UpdateTestCaseRequest, CallSettings)
public virtual TestCase UpdateTestCase(UpdateTestCaseRequest request, CallSettings callSettings = null)
Updates the specified test case.
Parameters | |
---|---|
Name | Description |
request |
UpdateTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestCase |
The RPC response. |
// Create client
TestCasesClient testCasesClient = TestCasesClient.Create();
// Initialize request argument(s)
UpdateTestCaseRequest request = new UpdateTestCaseRequest
{
TestCase = new TestCase(),
UpdateMask = new FieldMask(),
};
// Make the request
TestCase response = testCasesClient.UpdateTestCase(request);
UpdateTestCaseAsync(TestCase, FieldMask, CallSettings)
public virtual Task<TestCase> UpdateTestCaseAsync(TestCase testCase, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified test case.
Parameters | |
---|---|
Name | Description |
testCase |
TestCase Required. The test case to update. |
updateMask |
FieldMask Required. The mask to specify which fields should be updated. The
[ |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCase testCase = new TestCase();
FieldMask updateMask = new FieldMask();
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(testCase, updateMask);
UpdateTestCaseAsync(TestCase, FieldMask, CancellationToken)
public virtual Task<TestCase> UpdateTestCaseAsync(TestCase testCase, FieldMask updateMask, CancellationToken cancellationToken)
Updates the specified test case.
Parameters | |
---|---|
Name | Description |
testCase |
TestCase Required. The test case to update. |
updateMask |
FieldMask Required. The mask to specify which fields should be updated. The
[ |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
TestCase testCase = new TestCase();
FieldMask updateMask = new FieldMask();
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(testCase, updateMask);
UpdateTestCaseAsync(UpdateTestCaseRequest, CallSettings)
public virtual Task<TestCase> UpdateTestCaseAsync(UpdateTestCaseRequest request, CallSettings callSettings = null)
Updates the specified test case.
Parameters | |
---|---|
Name | Description |
request |
UpdateTestCaseRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// Create client
TestCasesClient testCasesClient = await TestCasesClient.CreateAsync();
// Initialize request argument(s)
UpdateTestCaseRequest request = new UpdateTestCaseRequest
{
TestCase = new TestCase(),
UpdateMask = new FieldMask(),
};
// Make the request
TestCase response = await testCasesClient.UpdateTestCaseAsync(request);
UpdateTestCaseAsync(UpdateTestCaseRequest, CancellationToken)
public virtual Task<TestCase> UpdateTestCaseAsync(UpdateTestCaseRequest request, CancellationToken cancellationToken)
Updates the specified test case.
Parameters | |
---|---|
Name | Description |
request |
UpdateTestCaseRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestCase |
A Task containing the RPC response. |
// 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);