@google-cloud/discoveryengine 2.0.1 → 2.2.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.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -96,28 +96,18 @@ class ConversationalSearchServiceClient {
|
|
96
96
|
*/
|
97
97
|
constructor(opts, gaxInstance) {
|
98
98
|
// Ensure that options include all the required fields.
|
99
|
-
const staticMembers = this
|
100
|
-
|
101
|
-
if (opts?.universe_domain &&
|
102
|
-
opts?.universeDomain &&
|
103
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
99
|
+
const staticMembers = this.constructor;
|
100
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
104
101
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
105
102
|
}
|
106
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
107
|
-
|
108
|
-
: undefined;
|
109
|
-
this._universeDomain =
|
110
|
-
opts?.universeDomain ??
|
111
|
-
opts?.universe_domain ??
|
112
|
-
universeDomainEnvVar ??
|
113
|
-
'googleapis.com';
|
103
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
104
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
114
105
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
115
106
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
116
107
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
117
108
|
const port = opts?.port || staticMembers.port;
|
118
109
|
const clientConfig = opts?.clientConfig ?? {};
|
119
|
-
const fallback = opts?.fallback ??
|
120
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
110
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
121
111
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
122
112
|
// Request numeric enum values if REST transport is used.
|
123
113
|
opts.numericEnums = true;
|
@@ -147,7 +137,10 @@ class ConversationalSearchServiceClient {
|
|
147
137
|
}
|
148
138
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
149
139
|
// Determine the client header string.
|
150
|
-
const clientHeader = [
|
140
|
+
const clientHeader = [
|
141
|
+
`gax/${this._gaxModule.version}`,
|
142
|
+
`gapic/${version}`,
|
143
|
+
];
|
151
144
|
if (typeof process === 'object' && 'versions' in process) {
|
152
145
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
153
146
|
}
|
@@ -214,7 +207,7 @@ class ConversationalSearchServiceClient {
|
|
214
207
|
// pages). Denote the keys used for pagination and results.
|
215
208
|
this.descriptors.page = {
|
216
209
|
listConversations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'),
|
217
|
-
listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
|
210
|
+
listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
|
218
211
|
};
|
219
212
|
// Put together the default options sent with requests.
|
220
213
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.ConversationalSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -243,28 +236,13 @@ class ConversationalSearchServiceClient {
|
|
243
236
|
}
|
244
237
|
// Put together the "service stub" for
|
245
238
|
// google.cloud.discoveryengine.v1beta.ConversationalSearchService.
|
246
|
-
this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
.ConversationalSearchService, this._opts, this._providedCustomServicePath);
|
239
|
+
this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
240
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1beta.ConversationalSearchService') :
|
241
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
242
|
+
this._protos.google.cloud.discoveryengine.v1beta.ConversationalSearchService, this._opts, this._providedCustomServicePath);
|
251
243
|
// Iterate over each of the methods that the service provides
|
252
244
|
// and create an API call method for each.
|
253
|
-
const conversationalSearchServiceStubMethods = [
|
254
|
-
'converseConversation',
|
255
|
-
'createConversation',
|
256
|
-
'deleteConversation',
|
257
|
-
'updateConversation',
|
258
|
-
'getConversation',
|
259
|
-
'listConversations',
|
260
|
-
'answerQuery',
|
261
|
-
'getAnswer',
|
262
|
-
'createSession',
|
263
|
-
'deleteSession',
|
264
|
-
'updateSession',
|
265
|
-
'getSession',
|
266
|
-
'listSessions',
|
267
|
-
];
|
245
|
+
const conversationalSearchServiceStubMethods = ['converseConversation', 'createConversation', 'deleteConversation', 'updateConversation', 'getConversation', 'listConversations', 'answerQuery', 'getAnswer', 'createSession', 'deleteSession', 'updateSession', 'getSession', 'listSessions'];
|
268
246
|
for (const methodName of conversationalSearchServiceStubMethods) {
|
269
247
|
const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
|
270
248
|
if (this._terminated) {
|
@@ -275,7 +253,8 @@ class ConversationalSearchServiceClient {
|
|
275
253
|
}, (err) => () => {
|
276
254
|
throw err;
|
277
255
|
});
|
278
|
-
const descriptor = this.descriptors.page[methodName] ||
|
256
|
+
const descriptor = this.descriptors.page[methodName] ||
|
257
|
+
undefined;
|
279
258
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
280
259
|
this.innerApiCalls[methodName] = apiCall;
|
281
260
|
}
|
@@ -287,8 +266,7 @@ class ConversationalSearchServiceClient {
|
|
287
266
|
* @returns {string} The DNS address for this service.
|
288
267
|
*/
|
289
268
|
static get servicePath() {
|
290
|
-
if (typeof process === 'object' &&
|
291
|
-
typeof process.emitWarning === 'function') {
|
269
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
292
270
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
293
271
|
}
|
294
272
|
return 'discoveryengine.googleapis.com';
|
@@ -299,8 +277,7 @@ class ConversationalSearchServiceClient {
|
|
299
277
|
* @returns {string} The DNS address for this service.
|
300
278
|
*/
|
301
279
|
static get apiEndpoint() {
|
302
|
-
if (typeof process === 'object' &&
|
303
|
-
typeof process.emitWarning === 'function') {
|
280
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
304
281
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
305
282
|
}
|
306
283
|
return 'discoveryengine.googleapis.com';
|
@@ -328,7 +305,9 @@ class ConversationalSearchServiceClient {
|
|
328
305
|
* @returns {string[]} List of default scopes.
|
329
306
|
*/
|
330
307
|
static get scopes() {
|
331
|
-
return [
|
308
|
+
return [
|
309
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
310
|
+
];
|
332
311
|
}
|
333
312
|
/**
|
334
313
|
* Return the project ID used by this class.
|
@@ -354,13 +333,10 @@ class ConversationalSearchServiceClient {
|
|
354
333
|
options = options || {};
|
355
334
|
options.otherArgs = options.otherArgs || {};
|
356
335
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
357
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
358
|
-
|
359
|
-
name: request.name ?? '',
|
360
|
-
});
|
361
|
-
this.initialize().catch(err => {
|
362
|
-
throw err;
|
336
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
337
|
+
'name': request.name ?? '',
|
363
338
|
});
|
339
|
+
this.initialize().catch(err => { throw err; });
|
364
340
|
this._log.info('converseConversation request %j', request);
|
365
341
|
const wrappedCallback = callback
|
366
342
|
? (error, response, options, rawResponse) => {
|
@@ -368,8 +344,7 @@ class ConversationalSearchServiceClient {
|
|
368
344
|
callback(error, response, options, rawResponse); // We verified callback above.
|
369
345
|
}
|
370
346
|
: undefined;
|
371
|
-
return this.innerApiCalls
|
372
|
-
.converseConversation(request, options, wrappedCallback)
|
347
|
+
return this.innerApiCalls.converseConversation(request, options, wrappedCallback)
|
373
348
|
?.then(([response, options, rawResponse]) => {
|
374
349
|
this._log.info('converseConversation response %j', response);
|
375
350
|
return [response, options, rawResponse];
|
@@ -388,13 +363,10 @@ class ConversationalSearchServiceClient {
|
|
388
363
|
options = options || {};
|
389
364
|
options.otherArgs = options.otherArgs || {};
|
390
365
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
391
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
392
|
-
|
393
|
-
parent: request.parent ?? '',
|
394
|
-
});
|
395
|
-
this.initialize().catch(err => {
|
396
|
-
throw err;
|
366
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
367
|
+
'parent': request.parent ?? '',
|
397
368
|
});
|
369
|
+
this.initialize().catch(err => { throw err; });
|
398
370
|
this._log.info('createConversation request %j', request);
|
399
371
|
const wrappedCallback = callback
|
400
372
|
? (error, response, options, rawResponse) => {
|
@@ -402,8 +374,7 @@ class ConversationalSearchServiceClient {
|
|
402
374
|
callback(error, response, options, rawResponse); // We verified callback above.
|
403
375
|
}
|
404
376
|
: undefined;
|
405
|
-
return this.innerApiCalls
|
406
|
-
.createConversation(request, options, wrappedCallback)
|
377
|
+
return this.innerApiCalls.createConversation(request, options, wrappedCallback)
|
407
378
|
?.then(([response, options, rawResponse]) => {
|
408
379
|
this._log.info('createConversation response %j', response);
|
409
380
|
return [response, options, rawResponse];
|
@@ -422,13 +393,10 @@ class ConversationalSearchServiceClient {
|
|
422
393
|
options = options || {};
|
423
394
|
options.otherArgs = options.otherArgs || {};
|
424
395
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
425
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
426
|
-
|
427
|
-
name: request.name ?? '',
|
428
|
-
});
|
429
|
-
this.initialize().catch(err => {
|
430
|
-
throw err;
|
396
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
397
|
+
'name': request.name ?? '',
|
431
398
|
});
|
399
|
+
this.initialize().catch(err => { throw err; });
|
432
400
|
this._log.info('deleteConversation request %j', request);
|
433
401
|
const wrappedCallback = callback
|
434
402
|
? (error, response, options, rawResponse) => {
|
@@ -436,8 +404,7 @@ class ConversationalSearchServiceClient {
|
|
436
404
|
callback(error, response, options, rawResponse); // We verified callback above.
|
437
405
|
}
|
438
406
|
: undefined;
|
439
|
-
return this.innerApiCalls
|
440
|
-
.deleteConversation(request, options, wrappedCallback)
|
407
|
+
return this.innerApiCalls.deleteConversation(request, options, wrappedCallback)
|
441
408
|
?.then(([response, options, rawResponse]) => {
|
442
409
|
this._log.info('deleteConversation response %j', response);
|
443
410
|
return [response, options, rawResponse];
|
@@ -456,13 +423,10 @@ class ConversationalSearchServiceClient {
|
|
456
423
|
options = options || {};
|
457
424
|
options.otherArgs = options.otherArgs || {};
|
458
425
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
459
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
460
|
-
|
461
|
-
'conversation.name': request.conversation.name ?? '',
|
462
|
-
});
|
463
|
-
this.initialize().catch(err => {
|
464
|
-
throw err;
|
426
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
427
|
+
'conversation.name': request.conversation.name ?? '',
|
465
428
|
});
|
429
|
+
this.initialize().catch(err => { throw err; });
|
466
430
|
this._log.info('updateConversation request %j', request);
|
467
431
|
const wrappedCallback = callback
|
468
432
|
? (error, response, options, rawResponse) => {
|
@@ -470,8 +434,7 @@ class ConversationalSearchServiceClient {
|
|
470
434
|
callback(error, response, options, rawResponse); // We verified callback above.
|
471
435
|
}
|
472
436
|
: undefined;
|
473
|
-
return this.innerApiCalls
|
474
|
-
.updateConversation(request, options, wrappedCallback)
|
437
|
+
return this.innerApiCalls.updateConversation(request, options, wrappedCallback)
|
475
438
|
?.then(([response, options, rawResponse]) => {
|
476
439
|
this._log.info('updateConversation response %j', response);
|
477
440
|
return [response, options, rawResponse];
|
@@ -490,13 +453,10 @@ class ConversationalSearchServiceClient {
|
|
490
453
|
options = options || {};
|
491
454
|
options.otherArgs = options.otherArgs || {};
|
492
455
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
493
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
494
|
-
|
495
|
-
name: request.name ?? '',
|
496
|
-
});
|
497
|
-
this.initialize().catch(err => {
|
498
|
-
throw err;
|
456
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
457
|
+
'name': request.name ?? '',
|
499
458
|
});
|
459
|
+
this.initialize().catch(err => { throw err; });
|
500
460
|
this._log.info('getConversation request %j', request);
|
501
461
|
const wrappedCallback = callback
|
502
462
|
? (error, response, options, rawResponse) => {
|
@@ -504,8 +464,7 @@ class ConversationalSearchServiceClient {
|
|
504
464
|
callback(error, response, options, rawResponse); // We verified callback above.
|
505
465
|
}
|
506
466
|
: undefined;
|
507
|
-
return this.innerApiCalls
|
508
|
-
.getConversation(request, options, wrappedCallback)
|
467
|
+
return this.innerApiCalls.getConversation(request, options, wrappedCallback)
|
509
468
|
?.then(([response, options, rawResponse]) => {
|
510
469
|
this._log.info('getConversation response %j', response);
|
511
470
|
return [response, options, rawResponse];
|
@@ -524,13 +483,10 @@ class ConversationalSearchServiceClient {
|
|
524
483
|
options = options || {};
|
525
484
|
options.otherArgs = options.otherArgs || {};
|
526
485
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
527
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
528
|
-
|
529
|
-
serving_config: request.servingConfig ?? '',
|
530
|
-
});
|
531
|
-
this.initialize().catch(err => {
|
532
|
-
throw err;
|
486
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
487
|
+
'serving_config': request.servingConfig ?? '',
|
533
488
|
});
|
489
|
+
this.initialize().catch(err => { throw err; });
|
534
490
|
this._log.info('answerQuery request %j', request);
|
535
491
|
const wrappedCallback = callback
|
536
492
|
? (error, response, options, rawResponse) => {
|
@@ -538,8 +494,7 @@ class ConversationalSearchServiceClient {
|
|
538
494
|
callback(error, response, options, rawResponse); // We verified callback above.
|
539
495
|
}
|
540
496
|
: undefined;
|
541
|
-
return this.innerApiCalls
|
542
|
-
.answerQuery(request, options, wrappedCallback)
|
497
|
+
return this.innerApiCalls.answerQuery(request, options, wrappedCallback)
|
543
498
|
?.then(([response, options, rawResponse]) => {
|
544
499
|
this._log.info('answerQuery response %j', response);
|
545
500
|
return [response, options, rawResponse];
|
@@ -558,13 +513,10 @@ class ConversationalSearchServiceClient {
|
|
558
513
|
options = options || {};
|
559
514
|
options.otherArgs = options.otherArgs || {};
|
560
515
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
561
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
562
|
-
|
563
|
-
name: request.name ?? '',
|
564
|
-
});
|
565
|
-
this.initialize().catch(err => {
|
566
|
-
throw err;
|
516
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
517
|
+
'name': request.name ?? '',
|
567
518
|
});
|
519
|
+
this.initialize().catch(err => { throw err; });
|
568
520
|
this._log.info('getAnswer request %j', request);
|
569
521
|
const wrappedCallback = callback
|
570
522
|
? (error, response, options, rawResponse) => {
|
@@ -572,8 +524,7 @@ class ConversationalSearchServiceClient {
|
|
572
524
|
callback(error, response, options, rawResponse); // We verified callback above.
|
573
525
|
}
|
574
526
|
: undefined;
|
575
|
-
return this.innerApiCalls
|
576
|
-
.getAnswer(request, options, wrappedCallback)
|
527
|
+
return this.innerApiCalls.getAnswer(request, options, wrappedCallback)
|
577
528
|
?.then(([response, options, rawResponse]) => {
|
578
529
|
this._log.info('getAnswer response %j', response);
|
579
530
|
return [response, options, rawResponse];
|
@@ -592,13 +543,10 @@ class ConversationalSearchServiceClient {
|
|
592
543
|
options = options || {};
|
593
544
|
options.otherArgs = options.otherArgs || {};
|
594
545
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
595
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
596
|
-
|
597
|
-
parent: request.parent ?? '',
|
598
|
-
});
|
599
|
-
this.initialize().catch(err => {
|
600
|
-
throw err;
|
546
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
547
|
+
'parent': request.parent ?? '',
|
601
548
|
});
|
549
|
+
this.initialize().catch(err => { throw err; });
|
602
550
|
this._log.info('createSession request %j', request);
|
603
551
|
const wrappedCallback = callback
|
604
552
|
? (error, response, options, rawResponse) => {
|
@@ -606,8 +554,7 @@ class ConversationalSearchServiceClient {
|
|
606
554
|
callback(error, response, options, rawResponse); // We verified callback above.
|
607
555
|
}
|
608
556
|
: undefined;
|
609
|
-
return this.innerApiCalls
|
610
|
-
.createSession(request, options, wrappedCallback)
|
557
|
+
return this.innerApiCalls.createSession(request, options, wrappedCallback)
|
611
558
|
?.then(([response, options, rawResponse]) => {
|
612
559
|
this._log.info('createSession response %j', response);
|
613
560
|
return [response, options, rawResponse];
|
@@ -626,13 +573,10 @@ class ConversationalSearchServiceClient {
|
|
626
573
|
options = options || {};
|
627
574
|
options.otherArgs = options.otherArgs || {};
|
628
575
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
629
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
630
|
-
|
631
|
-
name: request.name ?? '',
|
632
|
-
});
|
633
|
-
this.initialize().catch(err => {
|
634
|
-
throw err;
|
576
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
577
|
+
'name': request.name ?? '',
|
635
578
|
});
|
579
|
+
this.initialize().catch(err => { throw err; });
|
636
580
|
this._log.info('deleteSession request %j', request);
|
637
581
|
const wrappedCallback = callback
|
638
582
|
? (error, response, options, rawResponse) => {
|
@@ -640,8 +584,7 @@ class ConversationalSearchServiceClient {
|
|
640
584
|
callback(error, response, options, rawResponse); // We verified callback above.
|
641
585
|
}
|
642
586
|
: undefined;
|
643
|
-
return this.innerApiCalls
|
644
|
-
.deleteSession(request, options, wrappedCallback)
|
587
|
+
return this.innerApiCalls.deleteSession(request, options, wrappedCallback)
|
645
588
|
?.then(([response, options, rawResponse]) => {
|
646
589
|
this._log.info('deleteSession response %j', response);
|
647
590
|
return [response, options, rawResponse];
|
@@ -660,13 +603,10 @@ class ConversationalSearchServiceClient {
|
|
660
603
|
options = options || {};
|
661
604
|
options.otherArgs = options.otherArgs || {};
|
662
605
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
663
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
664
|
-
|
665
|
-
'session.name': request.session.name ?? '',
|
666
|
-
});
|
667
|
-
this.initialize().catch(err => {
|
668
|
-
throw err;
|
606
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
607
|
+
'session.name': request.session.name ?? '',
|
669
608
|
});
|
609
|
+
this.initialize().catch(err => { throw err; });
|
670
610
|
this._log.info('updateSession request %j', request);
|
671
611
|
const wrappedCallback = callback
|
672
612
|
? (error, response, options, rawResponse) => {
|
@@ -674,8 +614,7 @@ class ConversationalSearchServiceClient {
|
|
674
614
|
callback(error, response, options, rawResponse); // We verified callback above.
|
675
615
|
}
|
676
616
|
: undefined;
|
677
|
-
return this.innerApiCalls
|
678
|
-
.updateSession(request, options, wrappedCallback)
|
617
|
+
return this.innerApiCalls.updateSession(request, options, wrappedCallback)
|
679
618
|
?.then(([response, options, rawResponse]) => {
|
680
619
|
this._log.info('updateSession response %j', response);
|
681
620
|
return [response, options, rawResponse];
|
@@ -694,13 +633,10 @@ class ConversationalSearchServiceClient {
|
|
694
633
|
options = options || {};
|
695
634
|
options.otherArgs = options.otherArgs || {};
|
696
635
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
697
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
698
|
-
|
699
|
-
name: request.name ?? '',
|
700
|
-
});
|
701
|
-
this.initialize().catch(err => {
|
702
|
-
throw err;
|
636
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
637
|
+
'name': request.name ?? '',
|
703
638
|
});
|
639
|
+
this.initialize().catch(err => { throw err; });
|
704
640
|
this._log.info('getSession request %j', request);
|
705
641
|
const wrappedCallback = callback
|
706
642
|
? (error, response, options, rawResponse) => {
|
@@ -708,8 +644,7 @@ class ConversationalSearchServiceClient {
|
|
708
644
|
callback(error, response, options, rawResponse); // We verified callback above.
|
709
645
|
}
|
710
646
|
: undefined;
|
711
|
-
return this.innerApiCalls
|
712
|
-
.getSession(request, options, wrappedCallback)
|
647
|
+
return this.innerApiCalls.getSession(request, options, wrappedCallback)
|
713
648
|
?.then(([response, options, rawResponse]) => {
|
714
649
|
this._log.info('getSession response %j', response);
|
715
650
|
return [response, options, rawResponse];
|
@@ -728,13 +663,10 @@ class ConversationalSearchServiceClient {
|
|
728
663
|
options = options || {};
|
729
664
|
options.otherArgs = options.otherArgs || {};
|
730
665
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
731
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
732
|
-
|
733
|
-
parent: request.parent ?? '',
|
734
|
-
});
|
735
|
-
this.initialize().catch(err => {
|
736
|
-
throw err;
|
666
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
667
|
+
'parent': request.parent ?? '',
|
737
668
|
});
|
669
|
+
this.initialize().catch(err => { throw err; });
|
738
670
|
const wrappedCallback = callback
|
739
671
|
? (error, values, nextPageRequest, rawResponse) => {
|
740
672
|
this._log.info('listConversations values %j', values);
|
@@ -795,15 +727,12 @@ class ConversationalSearchServiceClient {
|
|
795
727
|
options = options || {};
|
796
728
|
options.otherArgs = options.otherArgs || {};
|
797
729
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
798
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
799
|
-
|
800
|
-
|
801
|
-
});
|
730
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
731
|
+
'parent': request.parent ?? '',
|
732
|
+
});
|
802
733
|
const defaultCallSettings = this._defaults['listConversations'];
|
803
734
|
const callSettings = defaultCallSettings.merge(options);
|
804
|
-
this.initialize().catch(err => {
|
805
|
-
throw err;
|
806
|
-
});
|
735
|
+
this.initialize().catch(err => { throw err; });
|
807
736
|
this._log.info('listConversations stream %j', request);
|
808
737
|
return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
|
809
738
|
}
|
@@ -856,15 +785,12 @@ class ConversationalSearchServiceClient {
|
|
856
785
|
options = options || {};
|
857
786
|
options.otherArgs = options.otherArgs || {};
|
858
787
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
859
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
860
|
-
|
861
|
-
|
862
|
-
});
|
788
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
789
|
+
'parent': request.parent ?? '',
|
790
|
+
});
|
863
791
|
const defaultCallSettings = this._defaults['listConversations'];
|
864
792
|
const callSettings = defaultCallSettings.merge(options);
|
865
|
-
this.initialize().catch(err => {
|
866
|
-
throw err;
|
867
|
-
});
|
793
|
+
this.initialize().catch(err => { throw err; });
|
868
794
|
this._log.info('listConversations iterate %j', request);
|
869
795
|
return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
|
870
796
|
}
|
@@ -881,13 +807,10 @@ class ConversationalSearchServiceClient {
|
|
881
807
|
options = options || {};
|
882
808
|
options.otherArgs = options.otherArgs || {};
|
883
809
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
884
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
885
|
-
|
886
|
-
parent: request.parent ?? '',
|
887
|
-
});
|
888
|
-
this.initialize().catch(err => {
|
889
|
-
throw err;
|
810
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
811
|
+
'parent': request.parent ?? '',
|
890
812
|
});
|
813
|
+
this.initialize().catch(err => { throw err; });
|
891
814
|
const wrappedCallback = callback
|
892
815
|
? (error, values, nextPageRequest, rawResponse) => {
|
893
816
|
this._log.info('listSessions values %j', values);
|
@@ -948,15 +871,12 @@ class ConversationalSearchServiceClient {
|
|
948
871
|
options = options || {};
|
949
872
|
options.otherArgs = options.otherArgs || {};
|
950
873
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
951
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
952
|
-
|
953
|
-
|
954
|
-
});
|
874
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
875
|
+
'parent': request.parent ?? '',
|
876
|
+
});
|
955
877
|
const defaultCallSettings = this._defaults['listSessions'];
|
956
878
|
const callSettings = defaultCallSettings.merge(options);
|
957
|
-
this.initialize().catch(err => {
|
958
|
-
throw err;
|
959
|
-
});
|
879
|
+
this.initialize().catch(err => { throw err; });
|
960
880
|
this._log.info('listSessions stream %j', request);
|
961
881
|
return this.descriptors.page.listSessions.createStream(this.innerApiCalls.listSessions, request, callSettings);
|
962
882
|
}
|
@@ -1009,70 +929,67 @@ class ConversationalSearchServiceClient {
|
|
1009
929
|
options = options || {};
|
1010
930
|
options.otherArgs = options.otherArgs || {};
|
1011
931
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1012
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1013
|
-
|
1014
|
-
|
1015
|
-
});
|
932
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
933
|
+
'parent': request.parent ?? '',
|
934
|
+
});
|
1016
935
|
const defaultCallSettings = this._defaults['listSessions'];
|
1017
936
|
const callSettings = defaultCallSettings.merge(options);
|
1018
|
-
this.initialize().catch(err => {
|
1019
|
-
throw err;
|
1020
|
-
});
|
937
|
+
this.initialize().catch(err => { throw err; });
|
1021
938
|
this._log.info('listSessions iterate %j', request);
|
1022
939
|
return this.descriptors.page.listSessions.asyncIterate(this.innerApiCalls['listSessions'], request, callSettings);
|
1023
940
|
}
|
1024
941
|
/**
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
942
|
+
* Gets information about a location.
|
943
|
+
*
|
944
|
+
* @param {Object} request
|
945
|
+
* The request object that will be sent.
|
946
|
+
* @param {string} request.name
|
947
|
+
* Resource name for the location.
|
948
|
+
* @param {object} [options]
|
949
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
950
|
+
* @returns {Promise} - The promise which resolves to an array.
|
951
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
952
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
953
|
+
* for more details and examples.
|
954
|
+
* @example
|
955
|
+
* ```
|
956
|
+
* const [response] = await client.getLocation(request);
|
957
|
+
* ```
|
958
|
+
*/
|
1042
959
|
getLocation(request, options, callback) {
|
1043
960
|
return this.locationsClient.getLocation(request, options, callback);
|
1044
961
|
}
|
1045
962
|
/**
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
963
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
964
|
+
*
|
965
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
966
|
+
* @param {Object} request
|
967
|
+
* The request object that will be sent.
|
968
|
+
* @param {string} request.name
|
969
|
+
* The resource that owns the locations collection, if applicable.
|
970
|
+
* @param {string} request.filter
|
971
|
+
* The standard list filter.
|
972
|
+
* @param {number} request.pageSize
|
973
|
+
* The standard list page size.
|
974
|
+
* @param {string} request.pageToken
|
975
|
+
* The standard list page token.
|
976
|
+
* @param {object} [options]
|
977
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
978
|
+
* @returns {Object}
|
979
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
980
|
+
* When you iterate the returned iterable, each element will be an object representing
|
981
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
982
|
+
* so you can stop the iteration when you don't need more results.
|
983
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
984
|
+
* for more details and examples.
|
985
|
+
* @example
|
986
|
+
* ```
|
987
|
+
* const iterable = client.listLocationsAsync(request);
|
988
|
+
* for await (const response of iterable) {
|
989
|
+
* // process response
|
990
|
+
* }
|
991
|
+
* ```
|
992
|
+
*/
|
1076
993
|
listLocationsAsync(request, options) {
|
1077
994
|
return this.locationsClient.listLocationsAsync(request, options);
|
1078
995
|
}
|
@@ -1159,8 +1076,7 @@ class ConversationalSearchServiceClient {
|
|
1159
1076
|
* @returns {string} A string representing the project.
|
1160
1077
|
*/
|
1161
1078
|
matchProjectFromEvaluationName(evaluationName) {
|
1162
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1163
|
-
.project;
|
1079
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1164
1080
|
}
|
1165
1081
|
/**
|
1166
1082
|
* Parse the location from Evaluation resource.
|
@@ -1170,8 +1086,7 @@ class ConversationalSearchServiceClient {
|
|
1170
1086
|
* @returns {string} A string representing the location.
|
1171
1087
|
*/
|
1172
1088
|
matchLocationFromEvaluationName(evaluationName) {
|
1173
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1174
|
-
.location;
|
1089
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1175
1090
|
}
|
1176
1091
|
/**
|
1177
1092
|
* Parse the evaluation from Evaluation resource.
|
@@ -1181,8 +1096,7 @@ class ConversationalSearchServiceClient {
|
|
1181
1096
|
* @returns {string} A string representing the evaluation.
|
1182
1097
|
*/
|
1183
1098
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1184
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1185
|
-
.evaluation;
|
1099
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1186
1100
|
}
|
1187
1101
|
/**
|
1188
1102
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3420,8 +3334,7 @@ class ConversationalSearchServiceClient {
|
|
3420
3334
|
* @returns {string} A string representing the project.
|
3421
3335
|
*/
|
3422
3336
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3423
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3424
|
-
.project;
|
3337
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3425
3338
|
}
|
3426
3339
|
/**
|
3427
3340
|
* Parse the location from SampleQuery resource.
|
@@ -3431,8 +3344,7 @@ class ConversationalSearchServiceClient {
|
|
3431
3344
|
* @returns {string} A string representing the location.
|
3432
3345
|
*/
|
3433
3346
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3434
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3435
|
-
.location;
|
3347
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3436
3348
|
}
|
3437
3349
|
/**
|
3438
3350
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3442,8 +3354,7 @@ class ConversationalSearchServiceClient {
|
|
3442
3354
|
* @returns {string} A string representing the sample_query_set.
|
3443
3355
|
*/
|
3444
3356
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3445
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3446
|
-
.sample_query_set;
|
3357
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3447
3358
|
}
|
3448
3359
|
/**
|
3449
3360
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3453,8 +3364,7 @@ class ConversationalSearchServiceClient {
|
|
3453
3364
|
* @returns {string} A string representing the sample_query.
|
3454
3365
|
*/
|
3455
3366
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3456
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3457
|
-
.sample_query;
|
3367
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3458
3368
|
}
|
3459
3369
|
/**
|
3460
3370
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3513,7 +3423,7 @@ class ConversationalSearchServiceClient {
|
|
3513
3423
|
this._log.info('ending gRPC channel');
|
3514
3424
|
this._terminated = true;
|
3515
3425
|
stub.close();
|
3516
|
-
this.locationsClient.close();
|
3426
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3517
3427
|
});
|
3518
3428
|
}
|
3519
3429
|
return Promise.resolve();
|