public abstract 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
.
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.
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default TestCases scopes.
Type | Description |
IReadOnlyList<String> |
The default TestCases scopes are:
ExportTestCasesOperationsClient
public virtual OperationsClient ExportTestCasesOperationsClient { get; }
The long-running operations client for ExportTestCases
.
Type | Description |
OperationsClient |
GrpcClient
public virtual TestCases.TestCasesClient GrpcClient { get; }
The underlying gRPC TestCases client
Type | Description |
TestCases.TestCasesClient |
ImportTestCasesOperationsClient
public virtual OperationsClient ImportTestCasesOperationsClient { get; }
The long-running operations client for ImportTestCases
.
Type | Description |
OperationsClient |
RunTestCaseOperationsClient
public virtual OperationsClient RunTestCaseOperationsClient { get; }
The long-running operations client for RunTestCase
.
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Type | Description |
ServiceMetadata |
Methods
BatchDeleteTestCases(AgentName, CallSettings)
public virtual void BatchDeleteTestCases(AgentName parent, CallSettings callSettings = null)
Batch deletes test cases.
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.
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.
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.
Name | Description |
parent | AgentName Required. The agent to delete test cases from.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
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.
Name | Description |
parent | AgentName Required. The agent to delete test cases from.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
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.
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. |
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.
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. |
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.
Name | Description |
parent | String Required. The agent to delete test cases from.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
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.
Name | Description |
parent | String Required. The agent to delete test cases from.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
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]
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. |
Type | Description |
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> | 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]
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. |
Type | Description |
Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> | 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]
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. |
Type | Description |
Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> | 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.
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. |
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.
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. |
Type | Description |
Task<CalculateCoverageResponse> | 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.
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. |
Type | Description |
Task<CalculateCoverageResponse> | 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.
Type | Description |
TestCasesClient | The created TestCasesClient. |
CreateAsync(CancellationToken)
public static Task<TestCasesClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a TestCasesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TestCasesClientBuilder.
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Type | Description |
Task<TestCasesClient> | The task representing the created TestCasesClient. |
CreateTestCase(AgentName, TestCase, CallSettings)
public virtual TestCase CreateTestCase(AgentName parent, TestCase testCase, CallSettings callSettings = null)
Creates a test case for the given agent.
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. |
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.
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. |
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.
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. |
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.
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. |
Type | Description |
Task<TestCase> | 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.
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. |
Type | Description |
Task<TestCase> | 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.
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. |
Type | Description |
Task<TestCase> | 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.
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. |
Type | Description |
Task<TestCase> | 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.
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. |
Type | Description |
Task<TestCase> | 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.
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. |
Type | Description |
Task<TestCase> | 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]
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. |
Type | Description |
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> | 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]
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. |
Type | Description |
Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> | 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]
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. |
Type | Description |
Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> | 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.
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. |
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.
Name | Description |
name | TestCaseName Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
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.
Name | Description |
name | String Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
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.
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. |
Type | Description |
Task<TestCase> | 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.
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. |
Type | Description |
Task<TestCase> | 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.
Name | Description |
name | TestCaseName Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<TestCase> | 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.
Name | Description |
name | TestCaseName Required. The name of the testcase.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<TestCase> | 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.
Name | Description |
name | String Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<TestCase> | 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.
Name | Description |
name | String Required. The name of the testcase.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<TestCase> | 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.
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. |
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.
Name | Description |
name | TestCaseResultName Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
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.
Name | Description |
name | String Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
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.
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. |
Type | Description |
Task<TestCaseResult> | 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.
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. |
Type | Description |
Task<TestCaseResult> | 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.
Name | Description |
name | TestCaseResultName Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<TestCaseResult> | 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.
Name | Description |
name | TestCaseResultName Required. The name of the testcase.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<TestCaseResult> | 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.
Name | Description |
name | String Required. The name of the testcase.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<TestCaseResult> | 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.
Name | Description |
name | String Required. The name of the testcase.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<TestCaseResult> | 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]
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. |
Type | Description |
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> | 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]
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. |
Type | Description |
Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> | 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]
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. |
Type | Description |
Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> | 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 a list of results for a given test case.
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. |
Type | Description |
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(TestCaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of results for a given test case.
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 | Nullable<Int32> 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. |
Type | Description |
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResults(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of results for a given test case.
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 | Nullable<Int32> 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. |
Type | Description |
PagedEnumerable<ListTestCaseResultsResponse, TestCaseResult> | 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 a list of results for a given test case.
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. |
Type | Description |
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(TestCaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of results for a given test case.
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 | Nullable<Int32> 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. |
Type | Description |
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> ListTestCaseResultsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of results for a given test case.
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 | Nullable<Int32> 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. |
Type | Description |
PagedAsyncEnumerable<ListTestCaseResultsResponse, TestCaseResult> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
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 | Nullable<Int32> 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. |
Type | Description |
PagedEnumerable<ListTestCasesResponse, TestCase> | 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.
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. |
Type | Description |
PagedEnumerable<ListTestCasesResponse, TestCase> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTestCasesResponse, TestCase> ListTestCases(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
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 | Nullable<Int32> 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. |
Type | Description |
PagedEnumerable<ListTestCasesResponse, TestCase> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
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 | Nullable<Int32> 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. |
Type | Description |
PagedAsyncEnumerable<ListTestCasesResponse, TestCase> | 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.
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. |
Type | Description |
PagedAsyncEnumerable<ListTestCasesResponse, TestCase> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTestCasesResponse, TestCase> ListTestCasesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Fetches a list of test cases for a given agent.
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 | Nullable<Int32> 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. |
Type | Description |
PagedAsyncEnumerable<ListTestCasesResponse, TestCase> | 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
.
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. |
Type | Description |
Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata> | The result of polling the operation. |
PollOnceBatchRunTestCasesAsync(String, CallSettings)
public virtual Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> PollOnceBatchRunTestCasesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchRunTestCases
.
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. |
Type | Description |
Task<Operation<BatchRunTestCasesResponse, BatchRunTestCasesMetadata>> | A task representing the result of polling the operation. |
PollOnceExportTestCases(String, CallSettings)
public virtual Operation<ExportTestCasesResponse, ExportTestCasesMetadata> PollOnceExportTestCases(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ExportTestCases
.
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. |
Type | Description |
Operation<ExportTestCasesResponse, ExportTestCasesMetadata> | The result of polling the operation. |
PollOnceExportTestCasesAsync(String, CallSettings)
public virtual Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> PollOnceExportTestCasesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportTestCases
.
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. |
Type | Description |
Task<Operation<ExportTestCasesResponse, ExportTestCasesMetadata>> | A task representing the result of polling the operation. |
PollOnceImportTestCases(String, CallSettings)
public virtual Operation<ImportTestCasesResponse, ImportTestCasesMetadata> PollOnceImportTestCases(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ImportTestCases
.
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. |
Type | Description |
Operation<ImportTestCasesResponse, ImportTestCasesMetadata> | The result of polling the operation. |
PollOnceImportTestCasesAsync(String, CallSettings)
public virtual Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> PollOnceImportTestCasesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportTestCases
.
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. |
Type | Description |
Task<Operation<ImportTestCasesResponse, ImportTestCasesMetadata>> | A task representing the result of polling the operation. |
PollOnceRunTestCase(String, CallSettings)
public virtual Operation<RunTestCaseResponse, RunTestCaseMetadata> PollOnceRunTestCase(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of RunTestCase
.
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. |
Type | Description |
Operation<RunTestCaseResponse, RunTestCaseMetadata> | The result of polling the operation. |
PollOnceRunTestCaseAsync(String, CallSettings)
public virtual Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>> PollOnceRunTestCaseAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RunTestCase
.
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. |
Type | Description |
Task<Operation<RunTestCaseResponse, RunTestCaseMetadata>> | A task representing |