@google-cloud/dialogflow-cx
Version:
741 lines • 119 kB
TypeScript
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* Service for managing [Test
* Cases][google.cloud.dialogflow.cx.v3beta1.TestCase] and [Test Case
* Results][google.cloud.dialogflow.cx.v3beta1.TestCaseResult].
* @class
* @memberof v3beta1
*/
export declare class TestCasesClient {
private _terminated;
private _opts;
private _providedCustomServicePath;
private _gaxModule;
private _gaxGrpc;
private _protos;
private _defaults;
private _universeDomain;
private _servicePath;
private _log;
auth: gax.GoogleAuth;
descriptors: Descriptors;
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {
[name: string]: Function;
};
locationsClient: LocationsClient;
pathTemplates: {
[name: string]: gax.PathTemplate;
};
operationsClient: gax.OperationsClient;
testCasesStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of TestCasesClient.
*
* @param {object} [options] - The configuration object.
* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:
* @param {object} [options.credentials] - Credentials object.
* @param {string} [options.credentials.client_email]
* @param {string} [options.credentials.private_key]
* @param {string} [options.email] - Account email address. Required when
* using a .pem or .p12 keyFilename.
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
* .p12 key downloaded from the Google Developers Console. If you provide
* a path to a JSON file, the projectId option below is not necessary.
* NOTE: .pem and .p12 require you to specify options.email as well.
* @param {number} [options.port] - The port on which to connect to
* the remote host.
* @param {string} [options.projectId] - The project ID from the Google
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
* the environment variable GCLOUD_PROJECT for your project ID. If your
* app is running in an environment which supports
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.
* @param {string} [options.apiEndpoint] - The domain name of the
* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new TestCasesClient({fallback: true}, gax);
* ```
*/
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
/**
* Initialize the client.
* Performs asynchronous operations (such as authentication) and prepares the client.
* This function will be called automatically when any class method is called for the
* first time, but if you need to initialize it before calling an actual method,
* feel free to call initialize() directly.
*
* You can await on this method if you want to make sure the client is initialized.
*
* @returns {Promise} A promise that resolves to an authenticated service stub.
*/
initialize(): Promise<{
[name: string]: Function;
}>;
/**
* The DNS address for this API service.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath(): string;
/**
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint(): string;
/**
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get apiEndpoint(): string;
get universeDomain(): string;
/**
* The port for this API service.
* @returns {number} The default port for this service.
*/
static get port(): number;
/**
* The scopes needed to make gRPC calls for every method defined
* in this service.
* @returns {string[]} List of default scopes.
*/
static get scopes(): string[];
getProjectId(): Promise<string>;
getProjectId(callback: Callback<string, undefined, undefined>): void;
/**
* Batch deletes test cases.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to delete test cases from.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {string[]} request.names
* Required. Format of test case names:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.batch_delete_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_BatchDeleteTestCases_async
*/
batchDeleteTestCases(request?: protos.google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest | undefined,
{} | undefined
]>;
batchDeleteTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest | null | undefined, {} | null | undefined>): void;
batchDeleteTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest | null | undefined, {} | null | undefined>): void;
/**
* Gets a test case.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the testcase.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase|TestCase}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.get_test_case.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_GetTestCase_async
*/
getTestCase(request?: protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ITestCase,
protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest | undefined,
{} | undefined
]>;
getTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest, options: CallOptions, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase, protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest | null | undefined, {} | null | undefined>): void;
getTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase, protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a test case for the given agent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to create the test case for.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {google.cloud.dialogflow.cx.v3beta1.TestCase} request.testCase
* Required. The test case to create.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase|TestCase}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.create_test_case.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_CreateTestCase_async
*/
createTestCase(request?: protos.google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ITestCase,
protos.google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest | undefined,
{} | undefined
]>;
createTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest, options: CallOptions, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase, protos.google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest | null | undefined, {} | null | undefined>): void;
createTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase, protos.google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates the specified test case.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.cloud.dialogflow.cx.v3beta1.TestCase} request.testCase
* Required. The test case to update.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. The mask to specify which fields should be updated. The
* {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase.creation_time|`creationTime`}
* and
* {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase.last_test_result|`lastTestResult`}
* cannot be updated.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase|TestCase}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.update_test_case.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_UpdateTestCase_async
*/
updateTestCase(request?: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ITestCase,
protos.google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest | undefined,
{} | undefined
]>;
updateTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest, options: CallOptions, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase, protos.google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest | null | undefined, {} | null | undefined>): void;
updateTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase, protos.google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest | null | undefined, {} | null | undefined>): void;
/**
* Calculates the test coverage for an agent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.agent
* Required. The agent to calculate coverage for.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType} request.type
* Required. The type of coverage requested.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse|CalculateCoverageResponse}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.calculate_coverage.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_CalculateCoverage_async
*/
calculateCoverage(request?: protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse,
protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest | undefined,
{} | undefined
]>;
calculateCoverage(request: protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest, options: CallOptions, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse, protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest | null | undefined, {} | null | undefined>): void;
calculateCoverage(request: protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse, protos.google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest | null | undefined, {} | null | undefined>): void;
/**
* Gets a test case result.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the testcase.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCaseResult|TestCaseResult}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.get_test_case_result.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_GetTestCaseResult_async
*/
getTestCaseResult(request?: protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ITestCaseResult,
protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest | undefined,
{} | undefined
]>;
getTestCaseResult(request: protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest, options: CallOptions, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCaseResult, protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest | null | undefined, {} | null | undefined>): void;
getTestCaseResult(request: protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest, callback: Callback<protos.google.cloud.dialogflow.cx.v3beta1.ITestCaseResult, protos.google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest | null | undefined, {} | null | undefined>): void;
/**
* Kicks off a test case run.
*
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
*
* - `metadata`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata|RunTestCaseMetadata}
* - `response`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse|RunTestCaseResponse}
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Format of test case name to run:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* @param {string} [request.environment]
* Optional. Environment name. If not set, draft environment is assumed.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.run_test_case.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_RunTestCase_async
*/
runTestCase(request?: protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse, protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
runTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse, protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
runTestCase(request: protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse, protos.google.cloud.dialogflow.cx.v3beta1.IRunTestCaseMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `runTestCase()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.run_test_case.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_RunTestCase_async
*/
checkRunTestCaseProgress(name: string): Promise<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse, protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata>>;
/**
* Kicks off a batch run of test cases.
*
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
*
* - `metadata`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata|BatchRunTestCasesMetadata}
* - `response`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse|BatchRunTestCasesResponse}
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Agent name. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {string} [request.environment]
* Optional. If not set, draft environment is assumed. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
* @param {string[]} request.testCases
* Required. Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.batch_run_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_BatchRunTestCases_async
*/
batchRunTestCases(request?: protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
batchRunTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
batchRunTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `batchRunTestCases()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.batch_run_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_BatchRunTestCases_async
*/
checkBatchRunTestCasesProgress(name: string): Promise<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesMetadata>>;
/**
* Imports the test cases from a Cloud Storage bucket or a local file. It
* always creates new test cases and won't overwrite any existing ones. The
* provided ID in the imported test case is neglected.
*
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
*
* - `metadata`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata|ImportTestCasesMetadata}
* - `response`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse|ImportTestCasesResponse}
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to import test cases to.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {string} request.gcsUri
* The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
* to import test cases from. The format of this URI must be
* `gs://<bucket-name>/<object-name>`.
*
* Dialogflow performs a read operation for the Cloud Storage object
* on the caller's behalf, so your request authentication must
* have read permissions for the object. For more information, see
* [Dialogflow access
* control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
* @param {Buffer} request.content
* Uncompressed raw byte content for test cases.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.import_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_ImportTestCases_async
*/
importTestCases(request?: protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
importTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
importTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IImportTestCasesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `importTestCases()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.import_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_ImportTestCases_async
*/
checkImportTestCasesProgress(name: string): Promise<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata>>;
/**
* Exports the test cases under the agent to a Cloud Storage bucket or a local
* file. Filter can be applied to export a subset of test cases.
*
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
*
* - `metadata`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata|ExportTestCasesMetadata}
* - `response`:
* {@link protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse|ExportTestCasesResponse}
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent where to export test cases from.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {string} request.gcsUri
* The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to
* export the test cases to. The format of this URI must be
* `gs://<bucket-name>/<object-name>`. If unspecified, the serialized test
* cases is returned inline.
*
* Dialogflow performs a write operation for the Cloud Storage object
* on the caller's behalf, so your request authentication must
* have write permissions for the object. For more information, see
* [Dialogflow access
* control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
* @param {google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat} request.dataFormat
* The data format of the exported test cases. If not specified, `BLOB` is
* assumed.
* @param {string} request.filter
* The filter expression used to filter exported test cases, see
* [API Filtering](https://aip.dev/160). The expression is case insensitive
* and supports the following syntax:
*
* name = <value> [OR name = <value>] ...
*
* For example:
*
* * "name = t1 OR name = t2" matches the test case with the exact resource
* name "t1" or "t2".
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.export_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_ExportTestCases_async
*/
exportTestCases(request?: protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
exportTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
exportTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest, callback: Callback<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.IExportTestCasesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `exportTestCases()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.export_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_ExportTestCases_async
*/
checkExportTestCasesProgress(name: string): Promise<LROperation<protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse, protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata>>;
/**
* Fetches a list of test cases for a given agent.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to list all pages for.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {number} request.pageSize
* The maximum number of items to return in a single page. By default 20.
* Note that when TestCaseView = FULL, the maximum page size allowed is 20.
* When TestCaseView = BASIC, the maximum page size allowed is 500.
* @param {string} request.pageToken
* The next_page_token value returned from a previous list request.
* @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView} request.view
* Specifies whether response should include all fields or just the metadata.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase|TestCase}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listTestCasesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listTestCases(request?: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ITestCase[],
protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest | null,
protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse
]>;
listTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse | null | undefined, protos.google.cloud.dialogflow.cx.v3beta1.ITestCase>): void;
listTestCases(request: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, callback: PaginationCallback<protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse | null | undefined, protos.google.cloud.dialogflow.cx.v3beta1.ITestCase>): void;
/**
* Equivalent to `listTestCases`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to list all pages for.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {number} request.pageSize
* The maximum number of items to return in a single page. By default 20.
* Note that when TestCaseView = FULL, the maximum page size allowed is 20.
* When TestCaseView = BASIC, the maximum page size allowed is 500.
* @param {string} request.pageToken
* The next_page_token value returned from a previous list request.
* @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView} request.view
* Specifies whether response should include all fields or just the metadata.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase|TestCase} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listTestCasesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listTestCasesStream(request?: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listTestCases`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The agent to list all pages for.
* Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
* @param {number} request.pageSize
* The maximum number of items to return in a single page. By default 20.
* Note that when TestCaseView = FULL, the maximum page size allowed is 20.
* When TestCaseView = BASIC, the maximum page size allowed is 500.
* @param {string} request.pageToken
* The next_page_token value returned from a previous list request.
* @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView} request.view
* Specifies whether response should include all fields or just the metadata.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCase|TestCase}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3beta1/test_cases.list_test_cases.js</caption>
* region_tag:dialogflow_v3beta1_generated_TestCases_ListTestCases_async
*/
listTestCasesAsync(request?: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.dialogflow.cx.v3beta1.ITestCase>;
/**
* Fetches the list of run results for the given test case. A maximum of 100
* results are kept for each test case.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The test case to list results for.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* Specify a `-` as a wildcard for TestCase ID to
* list results across multiple test cases.
* @param {number} request.pageSize
* The maximum number of items to return in a single page. By default 100 and
* at most 1000.
* @param {string} request.pageToken
* The next_page_token value returned from a previous list request.
* @param {string} request.filter
* The filter expression used to filter test case results. See
* [API Filtering](https://aip.dev/160).
*
* The expression is case insensitive. Only 'AND' is supported for logical
* operators. The supported syntax is listed below in detail:
*
* <field> <operator> <value> [AND <field> <operator> <value>] ...
* [AND latest]
*
* The supported fields and operators are:
* field operator
* `environment` `=`, `IN` (Use value `draft` for draft environment)
* `test_time` `>`, `<`
*
* `latest` only returns the latest test result in all results for each test
* case.
*
* Examples:
* * "environment=draft AND latest" matches the latest test result for each
* test case in the draft environment.
* * "environment IN (e1,e2)" matches any test case results with an
* environment resource name of either "e1" or "e2".
* * "test_time > 1602540713" matches any test case results with test time
* later than a unix timestamp in seconds 1602540713.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCaseResult|TestCaseResult}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listTestCaseResultsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listTestCaseResults(request?: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, options?: CallOptions): Promise<[
protos.google.cloud.dialogflow.cx.v3beta1.ITestCaseResult[],
protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest | null,
protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsResponse
]>;
listTestCaseResults(request: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsResponse | null | undefined, protos.google.cloud.dialogflow.cx.v3beta1.ITestCaseResult>): void;
listTestCaseResults(request: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, callback: PaginationCallback<protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsResponse | null | undefined, protos.google.cloud.dialogflow.cx.v3beta1.ITestCaseResult>): void;
/**
* Equivalent to `listTestCaseResults`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The test case to list results for.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* Specify a `-` as a wildcard for TestCase ID to
* list results across multiple test cases.
* @param {number} request.pageSize
* The maximum number of items to return in a single page. By default 100 and
* at most 1000.
* @param {string} request.pageToken
* The next_page_token value returned from a previous list request.
* @param {string} request.filter
* The filter expression used to filter test case results. See
* [API Filtering](https://aip.dev/160).
*
* The expression is case insensitive. Only 'AND' is supported for logical
* operators. The supported syntax is listed below in detail:
*
* <field> <operator> <value> [AND <field> <operator> <value>] ...
* [AND latest]
*
* The supported fields and operators are:
* field operator
* `environment` `=`, `IN` (Use value `draft` for draft environment)
* `test_time` `>`, `<`
*
* `latest` only returns the latest test result in all results for each test
* case.
*
* Examples:
* * "environment=draft AND latest" matches the latest test result for each
* test case in the draft environment.
* * "environment IN (e1,e2)" matches any test case results with an
* environment resource name of either "e1" or "e2".
* * "test_time > 1602540713" matches any test case results with test time
* later than a unix timestamp in seconds 1602540713.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.TestCaseResult|TestCaseResult} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listTestCaseResultsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listTestCaseResultsStream(request?: protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listTestCaseResults`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The test case to list results for.
* Format:
* `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
* Specify a `-` as a wildcard for TestCase ID to
* list results across multiple test cases.
* @param {number} request.pageSize
* The maximum number of items to return in a single page. By default 100 and
* at most 1000.
* @param {string} request.pageToken
* The next_page_token value returned from a previous list request.
* @param {string} request.filter
* The filter expression used to filter test