@google-cloud/discoveryengine 2.1.0 → 2.3.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/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5415 -578
- package/build/protos/protos.js +77830 -63391
- package/build/protos/protos.json +1537 -92
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -22
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +166 -76
- package/build/src/v1/completion_service_client.js +258 -263
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +171 -81
- package/build/src/v1/control_service_client.js +246 -132
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +233 -143
- package/build/src/v1/conversational_search_service_client.js +330 -226
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +218 -122
- package/build/src/v1/data_store_service_client.js +273 -281
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +210 -120
- package/build/src/v1/document_service_client.js +300 -301
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +193 -103
- package/build/src/v1/engine_service_client.js +273 -280
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
- package/build/src/v1/grounded_generation_service_client.js +217 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +166 -76
- package/build/src/v1/project_service_client.js +235 -223
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +137 -47
- package/build/src/v1/rank_service_client.js +204 -85
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +137 -47
- package/build/src/v1/recommendation_service_client.js +202 -82
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +201 -111
- package/build/src/v1/schema_service_client.js +264 -274
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +661 -571
- package/build/src/v1/search_service_client.js +216 -113
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +167 -77
- package/build/src/v1/search_tuning_service_client.js +246 -236
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +138 -48
- package/build/src/v1/serving_config_service_client.js +201 -80
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
- package/build/src/v1/site_search_engine_service_client.js +324 -379
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +167 -77
- package/build/src/v1/user_event_service_client.js +260 -254
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +94 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +98 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +141 -281
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +129 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +211 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +176 -317
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +193 -329
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +180 -326
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +150 -296
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +139 -263
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +87 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +85 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +169 -302
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +147 -293
- 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 +129 -254
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +109 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +143 -272
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +149 -280
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +127 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +209 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +154 -289
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +181 -310
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +178 -316
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +148 -286
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +98 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +116 -232
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +85 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +83 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +167 -292
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +128 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +145 -283
- 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 +127 -244
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +107 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +205 -387
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +141 -262
- package/package.json +7 -7
- package/CHANGELOG.md +0 -267
@@ -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,11 +344,16 @@ 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];
|
351
|
+
}).catch((error) => {
|
352
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
353
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
354
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
355
|
+
}
|
356
|
+
throw error;
|
376
357
|
});
|
377
358
|
}
|
378
359
|
createConversation(request, optionsOrCallback, callback) {
|
@@ -388,13 +369,10 @@ class ConversationalSearchServiceClient {
|
|
388
369
|
options = options || {};
|
389
370
|
options.otherArgs = options.otherArgs || {};
|
390
371
|
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;
|
372
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
373
|
+
'parent': request.parent ?? '',
|
397
374
|
});
|
375
|
+
this.initialize().catch(err => { throw err; });
|
398
376
|
this._log.info('createConversation request %j', request);
|
399
377
|
const wrappedCallback = callback
|
400
378
|
? (error, response, options, rawResponse) => {
|
@@ -402,11 +380,16 @@ class ConversationalSearchServiceClient {
|
|
402
380
|
callback(error, response, options, rawResponse); // We verified callback above.
|
403
381
|
}
|
404
382
|
: undefined;
|
405
|
-
return this.innerApiCalls
|
406
|
-
.createConversation(request, options, wrappedCallback)
|
383
|
+
return this.innerApiCalls.createConversation(request, options, wrappedCallback)
|
407
384
|
?.then(([response, options, rawResponse]) => {
|
408
385
|
this._log.info('createConversation response %j', response);
|
409
386
|
return [response, options, rawResponse];
|
387
|
+
}).catch((error) => {
|
388
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
389
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
390
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
391
|
+
}
|
392
|
+
throw error;
|
410
393
|
});
|
411
394
|
}
|
412
395
|
deleteConversation(request, optionsOrCallback, callback) {
|
@@ -422,13 +405,10 @@ class ConversationalSearchServiceClient {
|
|
422
405
|
options = options || {};
|
423
406
|
options.otherArgs = options.otherArgs || {};
|
424
407
|
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;
|
408
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
409
|
+
'name': request.name ?? '',
|
431
410
|
});
|
411
|
+
this.initialize().catch(err => { throw err; });
|
432
412
|
this._log.info('deleteConversation request %j', request);
|
433
413
|
const wrappedCallback = callback
|
434
414
|
? (error, response, options, rawResponse) => {
|
@@ -436,11 +416,16 @@ class ConversationalSearchServiceClient {
|
|
436
416
|
callback(error, response, options, rawResponse); // We verified callback above.
|
437
417
|
}
|
438
418
|
: undefined;
|
439
|
-
return this.innerApiCalls
|
440
|
-
.deleteConversation(request, options, wrappedCallback)
|
419
|
+
return this.innerApiCalls.deleteConversation(request, options, wrappedCallback)
|
441
420
|
?.then(([response, options, rawResponse]) => {
|
442
421
|
this._log.info('deleteConversation response %j', response);
|
443
422
|
return [response, options, rawResponse];
|
423
|
+
}).catch((error) => {
|
424
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
425
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
426
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
427
|
+
}
|
428
|
+
throw error;
|
444
429
|
});
|
445
430
|
}
|
446
431
|
updateConversation(request, optionsOrCallback, callback) {
|
@@ -456,13 +441,10 @@ class ConversationalSearchServiceClient {
|
|
456
441
|
options = options || {};
|
457
442
|
options.otherArgs = options.otherArgs || {};
|
458
443
|
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;
|
444
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
445
|
+
'conversation.name': request.conversation.name ?? '',
|
465
446
|
});
|
447
|
+
this.initialize().catch(err => { throw err; });
|
466
448
|
this._log.info('updateConversation request %j', request);
|
467
449
|
const wrappedCallback = callback
|
468
450
|
? (error, response, options, rawResponse) => {
|
@@ -470,11 +452,16 @@ class ConversationalSearchServiceClient {
|
|
470
452
|
callback(error, response, options, rawResponse); // We verified callback above.
|
471
453
|
}
|
472
454
|
: undefined;
|
473
|
-
return this.innerApiCalls
|
474
|
-
.updateConversation(request, options, wrappedCallback)
|
455
|
+
return this.innerApiCalls.updateConversation(request, options, wrappedCallback)
|
475
456
|
?.then(([response, options, rawResponse]) => {
|
476
457
|
this._log.info('updateConversation response %j', response);
|
477
458
|
return [response, options, rawResponse];
|
459
|
+
}).catch((error) => {
|
460
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
461
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
462
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
463
|
+
}
|
464
|
+
throw error;
|
478
465
|
});
|
479
466
|
}
|
480
467
|
getConversation(request, optionsOrCallback, callback) {
|
@@ -490,13 +477,10 @@ class ConversationalSearchServiceClient {
|
|
490
477
|
options = options || {};
|
491
478
|
options.otherArgs = options.otherArgs || {};
|
492
479
|
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;
|
480
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
481
|
+
'name': request.name ?? '',
|
499
482
|
});
|
483
|
+
this.initialize().catch(err => { throw err; });
|
500
484
|
this._log.info('getConversation request %j', request);
|
501
485
|
const wrappedCallback = callback
|
502
486
|
? (error, response, options, rawResponse) => {
|
@@ -504,11 +488,16 @@ class ConversationalSearchServiceClient {
|
|
504
488
|
callback(error, response, options, rawResponse); // We verified callback above.
|
505
489
|
}
|
506
490
|
: undefined;
|
507
|
-
return this.innerApiCalls
|
508
|
-
.getConversation(request, options, wrappedCallback)
|
491
|
+
return this.innerApiCalls.getConversation(request, options, wrappedCallback)
|
509
492
|
?.then(([response, options, rawResponse]) => {
|
510
493
|
this._log.info('getConversation response %j', response);
|
511
494
|
return [response, options, rawResponse];
|
495
|
+
}).catch((error) => {
|
496
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
497
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
498
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
499
|
+
}
|
500
|
+
throw error;
|
512
501
|
});
|
513
502
|
}
|
514
503
|
answerQuery(request, optionsOrCallback, callback) {
|
@@ -524,13 +513,10 @@ class ConversationalSearchServiceClient {
|
|
524
513
|
options = options || {};
|
525
514
|
options.otherArgs = options.otherArgs || {};
|
526
515
|
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;
|
516
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
517
|
+
'serving_config': request.servingConfig ?? '',
|
533
518
|
});
|
519
|
+
this.initialize().catch(err => { throw err; });
|
534
520
|
this._log.info('answerQuery request %j', request);
|
535
521
|
const wrappedCallback = callback
|
536
522
|
? (error, response, options, rawResponse) => {
|
@@ -538,11 +524,16 @@ class ConversationalSearchServiceClient {
|
|
538
524
|
callback(error, response, options, rawResponse); // We verified callback above.
|
539
525
|
}
|
540
526
|
: undefined;
|
541
|
-
return this.innerApiCalls
|
542
|
-
.answerQuery(request, options, wrappedCallback)
|
527
|
+
return this.innerApiCalls.answerQuery(request, options, wrappedCallback)
|
543
528
|
?.then(([response, options, rawResponse]) => {
|
544
529
|
this._log.info('answerQuery response %j', response);
|
545
530
|
return [response, options, rawResponse];
|
531
|
+
}).catch((error) => {
|
532
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
533
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
534
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
535
|
+
}
|
536
|
+
throw error;
|
546
537
|
});
|
547
538
|
}
|
548
539
|
getAnswer(request, optionsOrCallback, callback) {
|
@@ -558,13 +549,10 @@ class ConversationalSearchServiceClient {
|
|
558
549
|
options = options || {};
|
559
550
|
options.otherArgs = options.otherArgs || {};
|
560
551
|
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;
|
552
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
553
|
+
'name': request.name ?? '',
|
567
554
|
});
|
555
|
+
this.initialize().catch(err => { throw err; });
|
568
556
|
this._log.info('getAnswer request %j', request);
|
569
557
|
const wrappedCallback = callback
|
570
558
|
? (error, response, options, rawResponse) => {
|
@@ -572,11 +560,16 @@ class ConversationalSearchServiceClient {
|
|
572
560
|
callback(error, response, options, rawResponse); // We verified callback above.
|
573
561
|
}
|
574
562
|
: undefined;
|
575
|
-
return this.innerApiCalls
|
576
|
-
.getAnswer(request, options, wrappedCallback)
|
563
|
+
return this.innerApiCalls.getAnswer(request, options, wrappedCallback)
|
577
564
|
?.then(([response, options, rawResponse]) => {
|
578
565
|
this._log.info('getAnswer response %j', response);
|
579
566
|
return [response, options, rawResponse];
|
567
|
+
}).catch((error) => {
|
568
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
569
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
570
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
571
|
+
}
|
572
|
+
throw error;
|
580
573
|
});
|
581
574
|
}
|
582
575
|
createSession(request, optionsOrCallback, callback) {
|
@@ -592,13 +585,10 @@ class ConversationalSearchServiceClient {
|
|
592
585
|
options = options || {};
|
593
586
|
options.otherArgs = options.otherArgs || {};
|
594
587
|
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;
|
588
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
589
|
+
'parent': request.parent ?? '',
|
601
590
|
});
|
591
|
+
this.initialize().catch(err => { throw err; });
|
602
592
|
this._log.info('createSession request %j', request);
|
603
593
|
const wrappedCallback = callback
|
604
594
|
? (error, response, options, rawResponse) => {
|
@@ -606,11 +596,16 @@ class ConversationalSearchServiceClient {
|
|
606
596
|
callback(error, response, options, rawResponse); // We verified callback above.
|
607
597
|
}
|
608
598
|
: undefined;
|
609
|
-
return this.innerApiCalls
|
610
|
-
.createSession(request, options, wrappedCallback)
|
599
|
+
return this.innerApiCalls.createSession(request, options, wrappedCallback)
|
611
600
|
?.then(([response, options, rawResponse]) => {
|
612
601
|
this._log.info('createSession response %j', response);
|
613
602
|
return [response, options, rawResponse];
|
603
|
+
}).catch((error) => {
|
604
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
605
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
606
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
607
|
+
}
|
608
|
+
throw error;
|
614
609
|
});
|
615
610
|
}
|
616
611
|
deleteSession(request, optionsOrCallback, callback) {
|
@@ -626,13 +621,10 @@ class ConversationalSearchServiceClient {
|
|
626
621
|
options = options || {};
|
627
622
|
options.otherArgs = options.otherArgs || {};
|
628
623
|
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;
|
624
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
625
|
+
'name': request.name ?? '',
|
635
626
|
});
|
627
|
+
this.initialize().catch(err => { throw err; });
|
636
628
|
this._log.info('deleteSession request %j', request);
|
637
629
|
const wrappedCallback = callback
|
638
630
|
? (error, response, options, rawResponse) => {
|
@@ -640,11 +632,16 @@ class ConversationalSearchServiceClient {
|
|
640
632
|
callback(error, response, options, rawResponse); // We verified callback above.
|
641
633
|
}
|
642
634
|
: undefined;
|
643
|
-
return this.innerApiCalls
|
644
|
-
.deleteSession(request, options, wrappedCallback)
|
635
|
+
return this.innerApiCalls.deleteSession(request, options, wrappedCallback)
|
645
636
|
?.then(([response, options, rawResponse]) => {
|
646
637
|
this._log.info('deleteSession response %j', response);
|
647
638
|
return [response, options, rawResponse];
|
639
|
+
}).catch((error) => {
|
640
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
641
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
642
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
643
|
+
}
|
644
|
+
throw error;
|
648
645
|
});
|
649
646
|
}
|
650
647
|
updateSession(request, optionsOrCallback, callback) {
|
@@ -660,13 +657,10 @@ class ConversationalSearchServiceClient {
|
|
660
657
|
options = options || {};
|
661
658
|
options.otherArgs = options.otherArgs || {};
|
662
659
|
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;
|
660
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
661
|
+
'session.name': request.session.name ?? '',
|
669
662
|
});
|
663
|
+
this.initialize().catch(err => { throw err; });
|
670
664
|
this._log.info('updateSession request %j', request);
|
671
665
|
const wrappedCallback = callback
|
672
666
|
? (error, response, options, rawResponse) => {
|
@@ -674,11 +668,16 @@ class ConversationalSearchServiceClient {
|
|
674
668
|
callback(error, response, options, rawResponse); // We verified callback above.
|
675
669
|
}
|
676
670
|
: undefined;
|
677
|
-
return this.innerApiCalls
|
678
|
-
.updateSession(request, options, wrappedCallback)
|
671
|
+
return this.innerApiCalls.updateSession(request, options, wrappedCallback)
|
679
672
|
?.then(([response, options, rawResponse]) => {
|
680
673
|
this._log.info('updateSession response %j', response);
|
681
674
|
return [response, options, rawResponse];
|
675
|
+
}).catch((error) => {
|
676
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
677
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
678
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
679
|
+
}
|
680
|
+
throw error;
|
682
681
|
});
|
683
682
|
}
|
684
683
|
getSession(request, optionsOrCallback, callback) {
|
@@ -694,13 +693,10 @@ class ConversationalSearchServiceClient {
|
|
694
693
|
options = options || {};
|
695
694
|
options.otherArgs = options.otherArgs || {};
|
696
695
|
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;
|
696
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
697
|
+
'name': request.name ?? '',
|
703
698
|
});
|
699
|
+
this.initialize().catch(err => { throw err; });
|
704
700
|
this._log.info('getSession request %j', request);
|
705
701
|
const wrappedCallback = callback
|
706
702
|
? (error, response, options, rawResponse) => {
|
@@ -708,11 +704,16 @@ class ConversationalSearchServiceClient {
|
|
708
704
|
callback(error, response, options, rawResponse); // We verified callback above.
|
709
705
|
}
|
710
706
|
: undefined;
|
711
|
-
return this.innerApiCalls
|
712
|
-
.getSession(request, options, wrappedCallback)
|
707
|
+
return this.innerApiCalls.getSession(request, options, wrappedCallback)
|
713
708
|
?.then(([response, options, rawResponse]) => {
|
714
709
|
this._log.info('getSession response %j', response);
|
715
710
|
return [response, options, rawResponse];
|
711
|
+
}).catch((error) => {
|
712
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
713
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
714
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
715
|
+
}
|
716
|
+
throw error;
|
716
717
|
});
|
717
718
|
}
|
718
719
|
listConversations(request, optionsOrCallback, callback) {
|
@@ -728,13 +729,10 @@ class ConversationalSearchServiceClient {
|
|
728
729
|
options = options || {};
|
729
730
|
options.otherArgs = options.otherArgs || {};
|
730
731
|
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;
|
732
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
733
|
+
'parent': request.parent ?? '',
|
737
734
|
});
|
735
|
+
this.initialize().catch(err => { throw err; });
|
738
736
|
const wrappedCallback = callback
|
739
737
|
? (error, values, nextPageRequest, rawResponse) => {
|
740
738
|
this._log.info('listConversations values %j', values);
|
@@ -795,15 +793,12 @@ class ConversationalSearchServiceClient {
|
|
795
793
|
options = options || {};
|
796
794
|
options.otherArgs = options.otherArgs || {};
|
797
795
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
798
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
799
|
-
|
800
|
-
|
801
|
-
});
|
796
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
797
|
+
'parent': request.parent ?? '',
|
798
|
+
});
|
802
799
|
const defaultCallSettings = this._defaults['listConversations'];
|
803
800
|
const callSettings = defaultCallSettings.merge(options);
|
804
|
-
this.initialize().catch(err => {
|
805
|
-
throw err;
|
806
|
-
});
|
801
|
+
this.initialize().catch(err => { throw err; });
|
807
802
|
this._log.info('listConversations stream %j', request);
|
808
803
|
return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
|
809
804
|
}
|
@@ -856,15 +851,12 @@ class ConversationalSearchServiceClient {
|
|
856
851
|
options = options || {};
|
857
852
|
options.otherArgs = options.otherArgs || {};
|
858
853
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
859
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
860
|
-
|
861
|
-
|
862
|
-
});
|
854
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
855
|
+
'parent': request.parent ?? '',
|
856
|
+
});
|
863
857
|
const defaultCallSettings = this._defaults['listConversations'];
|
864
858
|
const callSettings = defaultCallSettings.merge(options);
|
865
|
-
this.initialize().catch(err => {
|
866
|
-
throw err;
|
867
|
-
});
|
859
|
+
this.initialize().catch(err => { throw err; });
|
868
860
|
this._log.info('listConversations iterate %j', request);
|
869
861
|
return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
|
870
862
|
}
|
@@ -881,13 +873,10 @@ class ConversationalSearchServiceClient {
|
|
881
873
|
options = options || {};
|
882
874
|
options.otherArgs = options.otherArgs || {};
|
883
875
|
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;
|
876
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
877
|
+
'parent': request.parent ?? '',
|
890
878
|
});
|
879
|
+
this.initialize().catch(err => { throw err; });
|
891
880
|
const wrappedCallback = callback
|
892
881
|
? (error, values, nextPageRequest, rawResponse) => {
|
893
882
|
this._log.info('listSessions values %j', values);
|
@@ -948,15 +937,12 @@ class ConversationalSearchServiceClient {
|
|
948
937
|
options = options || {};
|
949
938
|
options.otherArgs = options.otherArgs || {};
|
950
939
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
951
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
952
|
-
|
953
|
-
|
954
|
-
});
|
940
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
941
|
+
'parent': request.parent ?? '',
|
942
|
+
});
|
955
943
|
const defaultCallSettings = this._defaults['listSessions'];
|
956
944
|
const callSettings = defaultCallSettings.merge(options);
|
957
|
-
this.initialize().catch(err => {
|
958
|
-
throw err;
|
959
|
-
});
|
945
|
+
this.initialize().catch(err => { throw err; });
|
960
946
|
this._log.info('listSessions stream %j', request);
|
961
947
|
return this.descriptors.page.listSessions.createStream(this.innerApiCalls.listSessions, request, callSettings);
|
962
948
|
}
|
@@ -1009,70 +995,67 @@ class ConversationalSearchServiceClient {
|
|
1009
995
|
options = options || {};
|
1010
996
|
options.otherArgs = options.otherArgs || {};
|
1011
997
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1012
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1013
|
-
|
1014
|
-
|
1015
|
-
});
|
998
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
999
|
+
'parent': request.parent ?? '',
|
1000
|
+
});
|
1016
1001
|
const defaultCallSettings = this._defaults['listSessions'];
|
1017
1002
|
const callSettings = defaultCallSettings.merge(options);
|
1018
|
-
this.initialize().catch(err => {
|
1019
|
-
throw err;
|
1020
|
-
});
|
1003
|
+
this.initialize().catch(err => { throw err; });
|
1021
1004
|
this._log.info('listSessions iterate %j', request);
|
1022
1005
|
return this.descriptors.page.listSessions.asyncIterate(this.innerApiCalls['listSessions'], request, callSettings);
|
1023
1006
|
}
|
1024
1007
|
/**
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1008
|
+
* Gets information about a location.
|
1009
|
+
*
|
1010
|
+
* @param {Object} request
|
1011
|
+
* The request object that will be sent.
|
1012
|
+
* @param {string} request.name
|
1013
|
+
* Resource name for the location.
|
1014
|
+
* @param {object} [options]
|
1015
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
1016
|
+
* @returns {Promise} - The promise which resolves to an array.
|
1017
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
1018
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
1019
|
+
* for more details and examples.
|
1020
|
+
* @example
|
1021
|
+
* ```
|
1022
|
+
* const [response] = await client.getLocation(request);
|
1023
|
+
* ```
|
1024
|
+
*/
|
1042
1025
|
getLocation(request, options, callback) {
|
1043
1026
|
return this.locationsClient.getLocation(request, options, callback);
|
1044
1027
|
}
|
1045
1028
|
/**
|
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
|
-
|
1029
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
1030
|
+
*
|
1031
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
1032
|
+
* @param {Object} request
|
1033
|
+
* The request object that will be sent.
|
1034
|
+
* @param {string} request.name
|
1035
|
+
* The resource that owns the locations collection, if applicable.
|
1036
|
+
* @param {string} request.filter
|
1037
|
+
* The standard list filter.
|
1038
|
+
* @param {number} request.pageSize
|
1039
|
+
* The standard list page size.
|
1040
|
+
* @param {string} request.pageToken
|
1041
|
+
* The standard list page token.
|
1042
|
+
* @param {object} [options]
|
1043
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1044
|
+
* @returns {Object}
|
1045
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1046
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1047
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1048
|
+
* so you can stop the iteration when you don't need more results.
|
1049
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1050
|
+
* for more details and examples.
|
1051
|
+
* @example
|
1052
|
+
* ```
|
1053
|
+
* const iterable = client.listLocationsAsync(request);
|
1054
|
+
* for await (const response of iterable) {
|
1055
|
+
* // process response
|
1056
|
+
* }
|
1057
|
+
* ```
|
1058
|
+
*/
|
1076
1059
|
listLocationsAsync(request, options) {
|
1077
1060
|
return this.locationsClient.listLocationsAsync(request, options);
|
1078
1061
|
}
|
@@ -1159,8 +1142,7 @@ class ConversationalSearchServiceClient {
|
|
1159
1142
|
* @returns {string} A string representing the project.
|
1160
1143
|
*/
|
1161
1144
|
matchProjectFromEvaluationName(evaluationName) {
|
1162
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1163
|
-
.project;
|
1145
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1164
1146
|
}
|
1165
1147
|
/**
|
1166
1148
|
* Parse the location from Evaluation resource.
|
@@ -1170,8 +1152,7 @@ class ConversationalSearchServiceClient {
|
|
1170
1152
|
* @returns {string} A string representing the location.
|
1171
1153
|
*/
|
1172
1154
|
matchLocationFromEvaluationName(evaluationName) {
|
1173
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1174
|
-
.location;
|
1155
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1175
1156
|
}
|
1176
1157
|
/**
|
1177
1158
|
* Parse the evaluation from Evaluation resource.
|
@@ -1181,8 +1162,7 @@ class ConversationalSearchServiceClient {
|
|
1181
1162
|
* @returns {string} A string representing the evaluation.
|
1182
1163
|
*/
|
1183
1164
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1184
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1185
|
-
.evaluation;
|
1165
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1186
1166
|
}
|
1187
1167
|
/**
|
1188
1168
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3420,8 +3400,7 @@ class ConversationalSearchServiceClient {
|
|
3420
3400
|
* @returns {string} A string representing the project.
|
3421
3401
|
*/
|
3422
3402
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3423
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3424
|
-
.project;
|
3403
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3425
3404
|
}
|
3426
3405
|
/**
|
3427
3406
|
* Parse the location from SampleQuery resource.
|
@@ -3431,8 +3410,7 @@ class ConversationalSearchServiceClient {
|
|
3431
3410
|
* @returns {string} A string representing the location.
|
3432
3411
|
*/
|
3433
3412
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3434
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3435
|
-
.location;
|
3413
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3436
3414
|
}
|
3437
3415
|
/**
|
3438
3416
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3442,8 +3420,7 @@ class ConversationalSearchServiceClient {
|
|
3442
3420
|
* @returns {string} A string representing the sample_query_set.
|
3443
3421
|
*/
|
3444
3422
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3445
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3446
|
-
.sample_query_set;
|
3423
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3447
3424
|
}
|
3448
3425
|
/**
|
3449
3426
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3453,8 +3430,7 @@ class ConversationalSearchServiceClient {
|
|
3453
3430
|
* @returns {string} A string representing the sample_query.
|
3454
3431
|
*/
|
3455
3432
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3456
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3457
|
-
.sample_query;
|
3433
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3458
3434
|
}
|
3459
3435
|
/**
|
3460
3436
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3513,7 +3489,7 @@ class ConversationalSearchServiceClient {
|
|
3513
3489
|
this._log.info('ending gRPC channel');
|
3514
3490
|
this._terminated = true;
|
3515
3491
|
stub.close();
|
3516
|
-
this.locationsClient.close();
|
3492
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3517
3493
|
});
|
3518
3494
|
}
|
3519
3495
|
return Promise.resolve();
|