@google-cloud/discoveryengine 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +7 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
  15. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
  17. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
  18. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
  19. package/build/protos/protos.d.ts +10140 -6536
  20. package/build/protos/protos.js +26499 -17277
  21. package/build/protos/protos.json +2311 -1440
  22. package/build/src/index.d.ts +4 -1
  23. package/build/src/index.js +4 -1
  24. package/build/src/v1/completion_service_client.d.ts +156 -6
  25. package/build/src/v1/completion_service_client.js +188 -4
  26. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  27. package/build/src/v1/conversational_search_service_client.js +1205 -0
  28. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  29. package/build/src/v1/document_service_client.d.ts +165 -18
  30. package/build/src/v1/document_service_client.js +215 -11
  31. package/build/src/v1/index.d.ts +1 -0
  32. package/build/src/v1/index.js +3 -1
  33. package/build/src/v1/schema_service_client.d.ts +148 -4
  34. package/build/src/v1/schema_service_client.js +207 -5
  35. package/build/src/v1/search_service_client.d.ts +238 -28
  36. package/build/src/v1/search_service_client.js +248 -20
  37. package/build/src/v1/user_event_service_client.d.ts +153 -9
  38. package/build/src/v1/user_event_service_client.js +207 -5
  39. package/build/src/v1beta/completion_service_client.d.ts +55 -4
  40. package/build/src/v1beta/completion_service_client.js +60 -4
  41. package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
  42. package/build/src/v1beta/conversational_search_service_client.js +60 -4
  43. package/build/src/v1beta/document_service_client.d.ts +55 -4
  44. package/build/src/v1beta/document_service_client.js +61 -5
  45. package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
  46. package/build/src/v1beta/recommendation_service_client.js +60 -4
  47. package/build/src/v1beta/schema_service_client.d.ts +55 -4
  48. package/build/src/v1beta/schema_service_client.js +61 -5
  49. package/build/src/v1beta/search_service_client.d.ts +142 -4
  50. package/build/src/v1beta/search_service_client.js +118 -4
  51. package/build/src/v1beta/user_event_service_client.d.ts +55 -4
  52. package/build/src/v1beta/user_event_service_client.js +61 -5
  53. package/package.json +3 -3
@@ -0,0 +1,1205 @@
1
+ "use strict";
2
+ // Copyright 2023 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.ConversationalSearchServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1/conversational_search_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./conversational_search_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for conversational search.
31
+ * @class
32
+ * @memberof v1
33
+ */
34
+ class ConversationalSearchServiceClient {
35
+ /**
36
+ * Construct an instance of ConversationalSearchServiceClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
+ * For more information, please check the
65
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
67
+ * need to avoid loading the default gRPC version and want to use the fallback
68
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
69
+ * ```
70
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
+ * const client = new ConversationalSearchServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this
85
+ .constructor;
86
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
87
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
88
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
89
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
90
+ const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
91
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
92
+ // Request numeric enum values if REST transport is used.
93
+ opts.numericEnums = true;
94
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
95
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
96
+ opts['scopes'] = staticMembers.scopes;
97
+ }
98
+ // Load google-gax module synchronously if needed
99
+ if (!gaxInstance) {
100
+ gaxInstance = require('google-gax');
101
+ }
102
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
103
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
104
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
105
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
106
+ // Save options to use in initialize() method.
107
+ this._opts = opts;
108
+ // Save the auth object to the client, for use by other methods.
109
+ this.auth = this._gaxGrpc.auth;
110
+ // Set useJWTAccessWithScope on the auth object.
111
+ this.auth.useJWTAccessWithScope = true;
112
+ // Set defaultServicePath on the auth object.
113
+ this.auth.defaultServicePath = staticMembers.servicePath;
114
+ // Set the default scopes in auth client if needed.
115
+ if (servicePath === staticMembers.servicePath) {
116
+ this.auth.defaultScopes = staticMembers.scopes;
117
+ }
118
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
119
+ // Determine the client header string.
120
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
121
+ if (typeof process !== 'undefined' && 'versions' in process) {
122
+ clientHeader.push(`gl-node/${process.versions.node}`);
123
+ }
124
+ else {
125
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
126
+ }
127
+ if (!opts.fallback) {
128
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
129
+ }
130
+ else {
131
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
132
+ }
133
+ if (opts.libName && opts.libVersion) {
134
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
135
+ }
136
+ // Load the applicable protos.
137
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
138
+ // This API contains "path templates"; forward-slash-separated
139
+ // identifiers to uniquely identify resources within the API.
140
+ // Create useful helper objects for these.
141
+ this.pathTemplates = {
142
+ projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
143
+ projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
144
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
145
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
146
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
147
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
148
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
149
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
150
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
151
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
152
+ };
153
+ // Some of the methods on this service return "paged" results,
154
+ // (e.g. 50 results at a time, with tokens to get subsequent
155
+ // pages). Denote the keys used for pagination and results.
156
+ this.descriptors.page = {
157
+ listConversations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'),
158
+ };
159
+ // Put together the default options sent with requests.
160
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.ConversationalSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
161
+ // Set up a dictionary of "inner API calls"; the core implementation
162
+ // of calling the API is handled in `google-gax`, with this code
163
+ // merely providing the destination and request information.
164
+ this.innerApiCalls = {};
165
+ // Add a warn function to the client constructor so it can be easily tested.
166
+ this.warn = this._gaxModule.warn;
167
+ }
168
+ /**
169
+ * Initialize the client.
170
+ * Performs asynchronous operations (such as authentication) and prepares the client.
171
+ * This function will be called automatically when any class method is called for the
172
+ * first time, but if you need to initialize it before calling an actual method,
173
+ * feel free to call initialize() directly.
174
+ *
175
+ * You can await on this method if you want to make sure the client is initialized.
176
+ *
177
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
178
+ */
179
+ initialize() {
180
+ // If the client stub promise is already initialized, return immediately.
181
+ if (this.conversationalSearchServiceStub) {
182
+ return this.conversationalSearchServiceStub;
183
+ }
184
+ // Put together the "service stub" for
185
+ // google.cloud.discoveryengine.v1.ConversationalSearchService.
186
+ this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
187
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1.ConversationalSearchService')
188
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
189
+ this._protos.google.cloud.discoveryengine.v1
190
+ .ConversationalSearchService, this._opts, this._providedCustomServicePath);
191
+ // Iterate over each of the methods that the service provides
192
+ // and create an API call method for each.
193
+ const conversationalSearchServiceStubMethods = [
194
+ 'converseConversation',
195
+ 'createConversation',
196
+ 'deleteConversation',
197
+ 'updateConversation',
198
+ 'getConversation',
199
+ 'listConversations',
200
+ ];
201
+ for (const methodName of conversationalSearchServiceStubMethods) {
202
+ const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
203
+ if (this._terminated) {
204
+ return Promise.reject('The client has already been closed.');
205
+ }
206
+ const func = stub[methodName];
207
+ return func.apply(stub, args);
208
+ }, (err) => () => {
209
+ throw err;
210
+ });
211
+ const descriptor = this.descriptors.page[methodName] || undefined;
212
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
213
+ this.innerApiCalls[methodName] = apiCall;
214
+ }
215
+ return this.conversationalSearchServiceStub;
216
+ }
217
+ /**
218
+ * The DNS address for this API service.
219
+ * @returns {string} The DNS address for this service.
220
+ */
221
+ static get servicePath() {
222
+ return 'discoveryengine.googleapis.com';
223
+ }
224
+ /**
225
+ * The DNS address for this API service - same as servicePath(),
226
+ * exists for compatibility reasons.
227
+ * @returns {string} The DNS address for this service.
228
+ */
229
+ static get apiEndpoint() {
230
+ return 'discoveryengine.googleapis.com';
231
+ }
232
+ /**
233
+ * The port for this API service.
234
+ * @returns {number} The default port for this service.
235
+ */
236
+ static get port() {
237
+ return 443;
238
+ }
239
+ /**
240
+ * The scopes needed to make gRPC calls for every method defined
241
+ * in this service.
242
+ * @returns {string[]} List of default scopes.
243
+ */
244
+ static get scopes() {
245
+ return ['https://www.googleapis.com/auth/cloud-platform'];
246
+ }
247
+ /**
248
+ * Return the project ID used by this class.
249
+ * @returns {Promise} A promise that resolves to string containing the project ID.
250
+ */
251
+ getProjectId(callback) {
252
+ if (callback) {
253
+ this.auth.getProjectId(callback);
254
+ return;
255
+ }
256
+ return this.auth.getProjectId();
257
+ }
258
+ converseConversation(request, optionsOrCallback, callback) {
259
+ var _a;
260
+ request = request || {};
261
+ let options;
262
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
263
+ callback = optionsOrCallback;
264
+ options = {};
265
+ }
266
+ else {
267
+ options = optionsOrCallback;
268
+ }
269
+ options = options || {};
270
+ options.otherArgs = options.otherArgs || {};
271
+ options.otherArgs.headers = options.otherArgs.headers || {};
272
+ options.otherArgs.headers['x-goog-request-params'] =
273
+ this._gaxModule.routingHeader.fromParams({
274
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
275
+ });
276
+ this.initialize();
277
+ return this.innerApiCalls.converseConversation(request, options, callback);
278
+ }
279
+ createConversation(request, optionsOrCallback, callback) {
280
+ var _a;
281
+ request = request || {};
282
+ let options;
283
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
284
+ callback = optionsOrCallback;
285
+ options = {};
286
+ }
287
+ else {
288
+ options = optionsOrCallback;
289
+ }
290
+ options = options || {};
291
+ options.otherArgs = options.otherArgs || {};
292
+ options.otherArgs.headers = options.otherArgs.headers || {};
293
+ options.otherArgs.headers['x-goog-request-params'] =
294
+ this._gaxModule.routingHeader.fromParams({
295
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
296
+ });
297
+ this.initialize();
298
+ return this.innerApiCalls.createConversation(request, options, callback);
299
+ }
300
+ deleteConversation(request, optionsOrCallback, callback) {
301
+ var _a;
302
+ request = request || {};
303
+ let options;
304
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
305
+ callback = optionsOrCallback;
306
+ options = {};
307
+ }
308
+ else {
309
+ options = optionsOrCallback;
310
+ }
311
+ options = options || {};
312
+ options.otherArgs = options.otherArgs || {};
313
+ options.otherArgs.headers = options.otherArgs.headers || {};
314
+ options.otherArgs.headers['x-goog-request-params'] =
315
+ this._gaxModule.routingHeader.fromParams({
316
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
317
+ });
318
+ this.initialize();
319
+ return this.innerApiCalls.deleteConversation(request, options, callback);
320
+ }
321
+ updateConversation(request, optionsOrCallback, callback) {
322
+ var _a;
323
+ request = request || {};
324
+ let options;
325
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
326
+ callback = optionsOrCallback;
327
+ options = {};
328
+ }
329
+ else {
330
+ options = optionsOrCallback;
331
+ }
332
+ options = options || {};
333
+ options.otherArgs = options.otherArgs || {};
334
+ options.otherArgs.headers = options.otherArgs.headers || {};
335
+ options.otherArgs.headers['x-goog-request-params'] =
336
+ this._gaxModule.routingHeader.fromParams({
337
+ 'conversation.name': (_a = request.conversation.name) !== null && _a !== void 0 ? _a : '',
338
+ });
339
+ this.initialize();
340
+ return this.innerApiCalls.updateConversation(request, options, callback);
341
+ }
342
+ getConversation(request, optionsOrCallback, callback) {
343
+ var _a;
344
+ request = request || {};
345
+ let options;
346
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
347
+ callback = optionsOrCallback;
348
+ options = {};
349
+ }
350
+ else {
351
+ options = optionsOrCallback;
352
+ }
353
+ options = options || {};
354
+ options.otherArgs = options.otherArgs || {};
355
+ options.otherArgs.headers = options.otherArgs.headers || {};
356
+ options.otherArgs.headers['x-goog-request-params'] =
357
+ this._gaxModule.routingHeader.fromParams({
358
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
359
+ });
360
+ this.initialize();
361
+ return this.innerApiCalls.getConversation(request, options, callback);
362
+ }
363
+ listConversations(request, optionsOrCallback, callback) {
364
+ var _a;
365
+ request = request || {};
366
+ let options;
367
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
368
+ callback = optionsOrCallback;
369
+ options = {};
370
+ }
371
+ else {
372
+ options = optionsOrCallback;
373
+ }
374
+ options = options || {};
375
+ options.otherArgs = options.otherArgs || {};
376
+ options.otherArgs.headers = options.otherArgs.headers || {};
377
+ options.otherArgs.headers['x-goog-request-params'] =
378
+ this._gaxModule.routingHeader.fromParams({
379
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
380
+ });
381
+ this.initialize();
382
+ return this.innerApiCalls.listConversations(request, options, callback);
383
+ }
384
+ /**
385
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
386
+ * @param {Object} request
387
+ * The request object that will be sent.
388
+ * @param {string} request.parent
389
+ * Required. The data store resource name. Format:
390
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
391
+ * @param {number} request.pageSize
392
+ * Maximum number of results to return. If unspecified, defaults
393
+ * to 50. Max allowed value is 1000.
394
+ * @param {string} request.pageToken
395
+ * A page token, received from a previous `ListConversations` call.
396
+ * Provide this to retrieve the subsequent page.
397
+ * @param {string} request.filter
398
+ * A filter to apply on the list results. The supported features are:
399
+ * user_pseudo_id, state.
400
+ *
401
+ * Example:
402
+ * "user_pseudo_id = some_id"
403
+ * @param {string} request.orderBy
404
+ * A comma-separated list of fields to order by, sorted in ascending order.
405
+ * Use "desc" after a field name for descending.
406
+ * Supported fields:
407
+ * * `update_time`
408
+ * * `create_time`
409
+ * * `conversation_name`
410
+ *
411
+ * Example:
412
+ * "update_time desc"
413
+ * "create_time"
414
+ * @param {object} [options]
415
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
416
+ * @returns {Stream}
417
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1.Conversation|Conversation} on 'data' event.
418
+ * The client library will perform auto-pagination by default: it will call the API as many
419
+ * times as needed. Note that it can affect your quota.
420
+ * We recommend using `listConversationsAsync()`
421
+ * method described below for async iteration which you can stop as needed.
422
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
423
+ * for more details and examples.
424
+ */
425
+ listConversationsStream(request, options) {
426
+ var _a;
427
+ request = request || {};
428
+ options = options || {};
429
+ options.otherArgs = options.otherArgs || {};
430
+ options.otherArgs.headers = options.otherArgs.headers || {};
431
+ options.otherArgs.headers['x-goog-request-params'] =
432
+ this._gaxModule.routingHeader.fromParams({
433
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
434
+ });
435
+ const defaultCallSettings = this._defaults['listConversations'];
436
+ const callSettings = defaultCallSettings.merge(options);
437
+ this.initialize();
438
+ return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
439
+ }
440
+ /**
441
+ * Equivalent to `listConversations`, but returns an iterable object.
442
+ *
443
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
444
+ * @param {Object} request
445
+ * The request object that will be sent.
446
+ * @param {string} request.parent
447
+ * Required. The data store resource name. Format:
448
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
449
+ * @param {number} request.pageSize
450
+ * Maximum number of results to return. If unspecified, defaults
451
+ * to 50. Max allowed value is 1000.
452
+ * @param {string} request.pageToken
453
+ * A page token, received from a previous `ListConversations` call.
454
+ * Provide this to retrieve the subsequent page.
455
+ * @param {string} request.filter
456
+ * A filter to apply on the list results. The supported features are:
457
+ * user_pseudo_id, state.
458
+ *
459
+ * Example:
460
+ * "user_pseudo_id = some_id"
461
+ * @param {string} request.orderBy
462
+ * A comma-separated list of fields to order by, sorted in ascending order.
463
+ * Use "desc" after a field name for descending.
464
+ * Supported fields:
465
+ * * `update_time`
466
+ * * `create_time`
467
+ * * `conversation_name`
468
+ *
469
+ * Example:
470
+ * "update_time desc"
471
+ * "create_time"
472
+ * @param {object} [options]
473
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
474
+ * @returns {Object}
475
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
476
+ * When you iterate the returned iterable, each element will be an object representing
477
+ * {@link protos.google.cloud.discoveryengine.v1.Conversation|Conversation}. The API will be called under the hood as needed, once per the page,
478
+ * so you can stop the iteration when you don't need more results.
479
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
480
+ * for more details and examples.
481
+ * @example <caption>include:samples/generated/v1/conversational_search_service.list_conversations.js</caption>
482
+ * region_tag:discoveryengine_v1_generated_ConversationalSearchService_ListConversations_async
483
+ */
484
+ listConversationsAsync(request, options) {
485
+ var _a;
486
+ request = request || {};
487
+ options = options || {};
488
+ options.otherArgs = options.otherArgs || {};
489
+ options.otherArgs.headers = options.otherArgs.headers || {};
490
+ options.otherArgs.headers['x-goog-request-params'] =
491
+ this._gaxModule.routingHeader.fromParams({
492
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
493
+ });
494
+ const defaultCallSettings = this._defaults['listConversations'];
495
+ const callSettings = defaultCallSettings.merge(options);
496
+ this.initialize();
497
+ return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
498
+ }
499
+ /**
500
+ * Gets information about a location.
501
+ *
502
+ * @param {Object} request
503
+ * The request object that will be sent.
504
+ * @param {string} request.name
505
+ * Resource name for the location.
506
+ * @param {object} [options]
507
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
508
+ * @returns {Promise} - The promise which resolves to an array.
509
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
510
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
511
+ * for more details and examples.
512
+ * @example
513
+ * ```
514
+ * const [response] = await client.getLocation(request);
515
+ * ```
516
+ */
517
+ getLocation(request, options, callback) {
518
+ return this.locationsClient.getLocation(request, options, callback);
519
+ }
520
+ /**
521
+ * Lists information about the supported locations for this service. Returns an iterable object.
522
+ *
523
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
524
+ * @param {Object} request
525
+ * The request object that will be sent.
526
+ * @param {string} request.name
527
+ * The resource that owns the locations collection, if applicable.
528
+ * @param {string} request.filter
529
+ * The standard list filter.
530
+ * @param {number} request.pageSize
531
+ * The standard list page size.
532
+ * @param {string} request.pageToken
533
+ * The standard list page token.
534
+ * @param {object} [options]
535
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
536
+ * @returns {Object}
537
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
538
+ * When you iterate the returned iterable, each element will be an object representing
539
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
540
+ * so you can stop the iteration when you don't need more results.
541
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
542
+ * for more details and examples.
543
+ * @example
544
+ * ```
545
+ * const iterable = client.listLocationsAsync(request);
546
+ * for await (const response of iterable) {
547
+ * // process response
548
+ * }
549
+ * ```
550
+ */
551
+ listLocationsAsync(request, options) {
552
+ return this.locationsClient.listLocationsAsync(request, options);
553
+ }
554
+ // --------------------
555
+ // -- Path templates --
556
+ // --------------------
557
+ /**
558
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
559
+ *
560
+ * @param {string} project
561
+ * @param {string} location
562
+ * @param {string} collection
563
+ * @param {string} data_store
564
+ * @returns {string} Resource name string.
565
+ */
566
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
567
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
568
+ project: project,
569
+ location: location,
570
+ collection: collection,
571
+ data_store: dataStore,
572
+ });
573
+ }
574
+ /**
575
+ * Parse the project from ProjectLocationCollectionDataStore resource.
576
+ *
577
+ * @param {string} projectLocationCollectionDataStoreName
578
+ * A fully-qualified path representing project_location_collection_data_store resource.
579
+ * @returns {string} A string representing the project.
580
+ */
581
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
582
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
583
+ }
584
+ /**
585
+ * Parse the location from ProjectLocationCollectionDataStore resource.
586
+ *
587
+ * @param {string} projectLocationCollectionDataStoreName
588
+ * A fully-qualified path representing project_location_collection_data_store resource.
589
+ * @returns {string} A string representing the location.
590
+ */
591
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
592
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
593
+ }
594
+ /**
595
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
596
+ *
597
+ * @param {string} projectLocationCollectionDataStoreName
598
+ * A fully-qualified path representing project_location_collection_data_store resource.
599
+ * @returns {string} A string representing the collection.
600
+ */
601
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
602
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
603
+ }
604
+ /**
605
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
606
+ *
607
+ * @param {string} projectLocationCollectionDataStoreName
608
+ * A fully-qualified path representing project_location_collection_data_store resource.
609
+ * @returns {string} A string representing the data_store.
610
+ */
611
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
612
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
613
+ }
614
+ /**
615
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
616
+ *
617
+ * @param {string} project
618
+ * @param {string} location
619
+ * @param {string} collection
620
+ * @param {string} data_store
621
+ * @param {string} branch
622
+ * @param {string} document
623
+ * @returns {string} Resource name string.
624
+ */
625
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
626
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
627
+ project: project,
628
+ location: location,
629
+ collection: collection,
630
+ data_store: dataStore,
631
+ branch: branch,
632
+ document: document,
633
+ });
634
+ }
635
+ /**
636
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
637
+ *
638
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
639
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
640
+ * @returns {string} A string representing the project.
641
+ */
642
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
643
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
644
+ }
645
+ /**
646
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
647
+ *
648
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
649
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
650
+ * @returns {string} A string representing the location.
651
+ */
652
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
653
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
654
+ }
655
+ /**
656
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
657
+ *
658
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
659
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
660
+ * @returns {string} A string representing the collection.
661
+ */
662
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
663
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
664
+ }
665
+ /**
666
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
667
+ *
668
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
669
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
670
+ * @returns {string} A string representing the data_store.
671
+ */
672
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
673
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
674
+ }
675
+ /**
676
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
677
+ *
678
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
679
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
680
+ * @returns {string} A string representing the branch.
681
+ */
682
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
683
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
684
+ }
685
+ /**
686
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
687
+ *
688
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
689
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
690
+ * @returns {string} A string representing the document.
691
+ */
692
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
693
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
694
+ }
695
+ /**
696
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
697
+ *
698
+ * @param {string} project
699
+ * @param {string} location
700
+ * @param {string} collection
701
+ * @param {string} data_store
702
+ * @param {string} conversation
703
+ * @returns {string} Resource name string.
704
+ */
705
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
706
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
707
+ project: project,
708
+ location: location,
709
+ collection: collection,
710
+ data_store: dataStore,
711
+ conversation: conversation,
712
+ });
713
+ }
714
+ /**
715
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
716
+ *
717
+ * @param {string} projectLocationCollectionDataStoreConversationName
718
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
719
+ * @returns {string} A string representing the project.
720
+ */
721
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
722
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
723
+ }
724
+ /**
725
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
726
+ *
727
+ * @param {string} projectLocationCollectionDataStoreConversationName
728
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
729
+ * @returns {string} A string representing the location.
730
+ */
731
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
732
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
733
+ }
734
+ /**
735
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
736
+ *
737
+ * @param {string} projectLocationCollectionDataStoreConversationName
738
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
739
+ * @returns {string} A string representing the collection.
740
+ */
741
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
742
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
743
+ }
744
+ /**
745
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
746
+ *
747
+ * @param {string} projectLocationCollectionDataStoreConversationName
748
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
749
+ * @returns {string} A string representing the data_store.
750
+ */
751
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
752
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
753
+ }
754
+ /**
755
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
756
+ *
757
+ * @param {string} projectLocationCollectionDataStoreConversationName
758
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
759
+ * @returns {string} A string representing the conversation.
760
+ */
761
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
762
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
763
+ }
764
+ /**
765
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
766
+ *
767
+ * @param {string} project
768
+ * @param {string} location
769
+ * @param {string} collection
770
+ * @param {string} data_store
771
+ * @param {string} schema
772
+ * @returns {string} Resource name string.
773
+ */
774
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
775
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
776
+ project: project,
777
+ location: location,
778
+ collection: collection,
779
+ data_store: dataStore,
780
+ schema: schema,
781
+ });
782
+ }
783
+ /**
784
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
785
+ *
786
+ * @param {string} projectLocationCollectionDataStoreSchemaName
787
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
788
+ * @returns {string} A string representing the project.
789
+ */
790
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
791
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
792
+ }
793
+ /**
794
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
795
+ *
796
+ * @param {string} projectLocationCollectionDataStoreSchemaName
797
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
798
+ * @returns {string} A string representing the location.
799
+ */
800
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
801
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
802
+ }
803
+ /**
804
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
805
+ *
806
+ * @param {string} projectLocationCollectionDataStoreSchemaName
807
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
808
+ * @returns {string} A string representing the collection.
809
+ */
810
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
811
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
812
+ }
813
+ /**
814
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
815
+ *
816
+ * @param {string} projectLocationCollectionDataStoreSchemaName
817
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
818
+ * @returns {string} A string representing the data_store.
819
+ */
820
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
821
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
822
+ }
823
+ /**
824
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
825
+ *
826
+ * @param {string} projectLocationCollectionDataStoreSchemaName
827
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
828
+ * @returns {string} A string representing the schema.
829
+ */
830
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
831
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
832
+ }
833
+ /**
834
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
835
+ *
836
+ * @param {string} project
837
+ * @param {string} location
838
+ * @param {string} collection
839
+ * @param {string} data_store
840
+ * @param {string} serving_config
841
+ * @returns {string} Resource name string.
842
+ */
843
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
844
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
845
+ project: project,
846
+ location: location,
847
+ collection: collection,
848
+ data_store: dataStore,
849
+ serving_config: servingConfig,
850
+ });
851
+ }
852
+ /**
853
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
854
+ *
855
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
856
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
857
+ * @returns {string} A string representing the project.
858
+ */
859
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
860
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
861
+ }
862
+ /**
863
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
864
+ *
865
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
866
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
867
+ * @returns {string} A string representing the location.
868
+ */
869
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
870
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
871
+ }
872
+ /**
873
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
874
+ *
875
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
876
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
877
+ * @returns {string} A string representing the collection.
878
+ */
879
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
880
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
881
+ }
882
+ /**
883
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
884
+ *
885
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
886
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
887
+ * @returns {string} A string representing the data_store.
888
+ */
889
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
890
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
891
+ }
892
+ /**
893
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
894
+ *
895
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
896
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
897
+ * @returns {string} A string representing the serving_config.
898
+ */
899
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
900
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
901
+ }
902
+ /**
903
+ * Return a fully-qualified projectLocationDataStore resource name string.
904
+ *
905
+ * @param {string} project
906
+ * @param {string} location
907
+ * @param {string} data_store
908
+ * @returns {string} Resource name string.
909
+ */
910
+ projectLocationDataStorePath(project, location, dataStore) {
911
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
912
+ project: project,
913
+ location: location,
914
+ data_store: dataStore,
915
+ });
916
+ }
917
+ /**
918
+ * Parse the project from ProjectLocationDataStore resource.
919
+ *
920
+ * @param {string} projectLocationDataStoreName
921
+ * A fully-qualified path representing project_location_data_store resource.
922
+ * @returns {string} A string representing the project.
923
+ */
924
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
925
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
926
+ }
927
+ /**
928
+ * Parse the location from ProjectLocationDataStore resource.
929
+ *
930
+ * @param {string} projectLocationDataStoreName
931
+ * A fully-qualified path representing project_location_data_store resource.
932
+ * @returns {string} A string representing the location.
933
+ */
934
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
935
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
936
+ }
937
+ /**
938
+ * Parse the data_store from ProjectLocationDataStore resource.
939
+ *
940
+ * @param {string} projectLocationDataStoreName
941
+ * A fully-qualified path representing project_location_data_store resource.
942
+ * @returns {string} A string representing the data_store.
943
+ */
944
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
945
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
946
+ }
947
+ /**
948
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
949
+ *
950
+ * @param {string} project
951
+ * @param {string} location
952
+ * @param {string} data_store
953
+ * @param {string} branch
954
+ * @param {string} document
955
+ * @returns {string} Resource name string.
956
+ */
957
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
958
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
959
+ project: project,
960
+ location: location,
961
+ data_store: dataStore,
962
+ branch: branch,
963
+ document: document,
964
+ });
965
+ }
966
+ /**
967
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
968
+ *
969
+ * @param {string} projectLocationDataStoreBranchDocumentName
970
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
971
+ * @returns {string} A string representing the project.
972
+ */
973
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
974
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
975
+ }
976
+ /**
977
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
978
+ *
979
+ * @param {string} projectLocationDataStoreBranchDocumentName
980
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
981
+ * @returns {string} A string representing the location.
982
+ */
983
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
984
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
985
+ }
986
+ /**
987
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
988
+ *
989
+ * @param {string} projectLocationDataStoreBranchDocumentName
990
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
991
+ * @returns {string} A string representing the data_store.
992
+ */
993
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
994
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
995
+ }
996
+ /**
997
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
998
+ *
999
+ * @param {string} projectLocationDataStoreBranchDocumentName
1000
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1001
+ * @returns {string} A string representing the branch.
1002
+ */
1003
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1004
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1005
+ }
1006
+ /**
1007
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1008
+ *
1009
+ * @param {string} projectLocationDataStoreBranchDocumentName
1010
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1011
+ * @returns {string} A string representing the document.
1012
+ */
1013
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1014
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1015
+ }
1016
+ /**
1017
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1018
+ *
1019
+ * @param {string} project
1020
+ * @param {string} location
1021
+ * @param {string} data_store
1022
+ * @param {string} conversation
1023
+ * @returns {string} Resource name string.
1024
+ */
1025
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1026
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1027
+ project: project,
1028
+ location: location,
1029
+ data_store: dataStore,
1030
+ conversation: conversation,
1031
+ });
1032
+ }
1033
+ /**
1034
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1035
+ *
1036
+ * @param {string} projectLocationDataStoreConversationName
1037
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1038
+ * @returns {string} A string representing the project.
1039
+ */
1040
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1041
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1042
+ }
1043
+ /**
1044
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1045
+ *
1046
+ * @param {string} projectLocationDataStoreConversationName
1047
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1048
+ * @returns {string} A string representing the location.
1049
+ */
1050
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1051
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1052
+ }
1053
+ /**
1054
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1055
+ *
1056
+ * @param {string} projectLocationDataStoreConversationName
1057
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1058
+ * @returns {string} A string representing the data_store.
1059
+ */
1060
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1061
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1062
+ }
1063
+ /**
1064
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1065
+ *
1066
+ * @param {string} projectLocationDataStoreConversationName
1067
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1068
+ * @returns {string} A string representing the conversation.
1069
+ */
1070
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1071
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1072
+ }
1073
+ /**
1074
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1075
+ *
1076
+ * @param {string} project
1077
+ * @param {string} location
1078
+ * @param {string} data_store
1079
+ * @param {string} schema
1080
+ * @returns {string} Resource name string.
1081
+ */
1082
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1083
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1084
+ project: project,
1085
+ location: location,
1086
+ data_store: dataStore,
1087
+ schema: schema,
1088
+ });
1089
+ }
1090
+ /**
1091
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1092
+ *
1093
+ * @param {string} projectLocationDataStoreSchemaName
1094
+ * A fully-qualified path representing project_location_data_store_schema resource.
1095
+ * @returns {string} A string representing the project.
1096
+ */
1097
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1098
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1099
+ }
1100
+ /**
1101
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1102
+ *
1103
+ * @param {string} projectLocationDataStoreSchemaName
1104
+ * A fully-qualified path representing project_location_data_store_schema resource.
1105
+ * @returns {string} A string representing the location.
1106
+ */
1107
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1108
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1109
+ }
1110
+ /**
1111
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1112
+ *
1113
+ * @param {string} projectLocationDataStoreSchemaName
1114
+ * A fully-qualified path representing project_location_data_store_schema resource.
1115
+ * @returns {string} A string representing the data_store.
1116
+ */
1117
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1118
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1119
+ }
1120
+ /**
1121
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1122
+ *
1123
+ * @param {string} projectLocationDataStoreSchemaName
1124
+ * A fully-qualified path representing project_location_data_store_schema resource.
1125
+ * @returns {string} A string representing the schema.
1126
+ */
1127
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1128
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1129
+ }
1130
+ /**
1131
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
1132
+ *
1133
+ * @param {string} project
1134
+ * @param {string} location
1135
+ * @param {string} data_store
1136
+ * @param {string} serving_config
1137
+ * @returns {string} Resource name string.
1138
+ */
1139
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
1140
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
1141
+ project: project,
1142
+ location: location,
1143
+ data_store: dataStore,
1144
+ serving_config: servingConfig,
1145
+ });
1146
+ }
1147
+ /**
1148
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
1149
+ *
1150
+ * @param {string} projectLocationDataStoreServingConfigName
1151
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1152
+ * @returns {string} A string representing the project.
1153
+ */
1154
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1155
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
1156
+ }
1157
+ /**
1158
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
1159
+ *
1160
+ * @param {string} projectLocationDataStoreServingConfigName
1161
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1162
+ * @returns {string} A string representing the location.
1163
+ */
1164
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1165
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
1166
+ }
1167
+ /**
1168
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
1169
+ *
1170
+ * @param {string} projectLocationDataStoreServingConfigName
1171
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1172
+ * @returns {string} A string representing the data_store.
1173
+ */
1174
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1175
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
1176
+ }
1177
+ /**
1178
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
1179
+ *
1180
+ * @param {string} projectLocationDataStoreServingConfigName
1181
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1182
+ * @returns {string} A string representing the serving_config.
1183
+ */
1184
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1185
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
1186
+ }
1187
+ /**
1188
+ * Terminate the gRPC channel and close the client.
1189
+ *
1190
+ * The client will no longer be usable and all future behavior is undefined.
1191
+ * @returns {Promise} A promise that resolves when the client is closed.
1192
+ */
1193
+ close() {
1194
+ if (this.conversationalSearchServiceStub && !this._terminated) {
1195
+ return this.conversationalSearchServiceStub.then(stub => {
1196
+ this._terminated = true;
1197
+ stub.close();
1198
+ this.locationsClient.close();
1199
+ });
1200
+ }
1201
+ return Promise.resolve();
1202
+ }
1203
+ }
1204
+ exports.ConversationalSearchServiceClient = ConversationalSearchServiceClient;
1205
+ //# sourceMappingURL=conversational_search_service_client.js.map