@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
|
}
|
@@ -212,7 +205,7 @@ class ConversationalSearchServiceClient {
|
|
212
205
|
// pages). Denote the keys used for pagination and results.
|
213
206
|
this.descriptors.page = {
|
214
207
|
listConversations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'),
|
215
|
-
listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
|
208
|
+
listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
|
216
209
|
};
|
217
210
|
// Put together the default options sent with requests.
|
218
211
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.ConversationalSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -241,28 +234,13 @@ class ConversationalSearchServiceClient {
|
|
241
234
|
}
|
242
235
|
// Put together the "service stub" for
|
243
236
|
// google.cloud.discoveryengine.v1alpha.ConversationalSearchService.
|
244
|
-
this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
.ConversationalSearchService, this._opts, this._providedCustomServicePath);
|
237
|
+
this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
238
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.ConversationalSearchService') :
|
239
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
240
|
+
this._protos.google.cloud.discoveryengine.v1alpha.ConversationalSearchService, this._opts, this._providedCustomServicePath);
|
249
241
|
// Iterate over each of the methods that the service provides
|
250
242
|
// and create an API call method for each.
|
251
|
-
const conversationalSearchServiceStubMethods = [
|
252
|
-
'converseConversation',
|
253
|
-
'createConversation',
|
254
|
-
'deleteConversation',
|
255
|
-
'updateConversation',
|
256
|
-
'getConversation',
|
257
|
-
'listConversations',
|
258
|
-
'answerQuery',
|
259
|
-
'getAnswer',
|
260
|
-
'createSession',
|
261
|
-
'deleteSession',
|
262
|
-
'updateSession',
|
263
|
-
'getSession',
|
264
|
-
'listSessions',
|
265
|
-
];
|
243
|
+
const conversationalSearchServiceStubMethods = ['converseConversation', 'createConversation', 'deleteConversation', 'updateConversation', 'getConversation', 'listConversations', 'answerQuery', 'getAnswer', 'createSession', 'deleteSession', 'updateSession', 'getSession', 'listSessions'];
|
266
244
|
for (const methodName of conversationalSearchServiceStubMethods) {
|
267
245
|
const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
|
268
246
|
if (this._terminated) {
|
@@ -273,7 +251,8 @@ class ConversationalSearchServiceClient {
|
|
273
251
|
}, (err) => () => {
|
274
252
|
throw err;
|
275
253
|
});
|
276
|
-
const descriptor = this.descriptors.page[methodName] ||
|
254
|
+
const descriptor = this.descriptors.page[methodName] ||
|
255
|
+
undefined;
|
277
256
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
278
257
|
this.innerApiCalls[methodName] = apiCall;
|
279
258
|
}
|
@@ -285,8 +264,7 @@ class ConversationalSearchServiceClient {
|
|
285
264
|
* @returns {string} The DNS address for this service.
|
286
265
|
*/
|
287
266
|
static get servicePath() {
|
288
|
-
if (typeof process === 'object' &&
|
289
|
-
typeof process.emitWarning === 'function') {
|
267
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
290
268
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
291
269
|
}
|
292
270
|
return 'discoveryengine.googleapis.com';
|
@@ -297,8 +275,7 @@ class ConversationalSearchServiceClient {
|
|
297
275
|
* @returns {string} The DNS address for this service.
|
298
276
|
*/
|
299
277
|
static get apiEndpoint() {
|
300
|
-
if (typeof process === 'object' &&
|
301
|
-
typeof process.emitWarning === 'function') {
|
278
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
302
279
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
303
280
|
}
|
304
281
|
return 'discoveryengine.googleapis.com';
|
@@ -326,7 +303,9 @@ class ConversationalSearchServiceClient {
|
|
326
303
|
* @returns {string[]} List of default scopes.
|
327
304
|
*/
|
328
305
|
static get scopes() {
|
329
|
-
return [
|
306
|
+
return [
|
307
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
308
|
+
];
|
330
309
|
}
|
331
310
|
/**
|
332
311
|
* Return the project ID used by this class.
|
@@ -352,13 +331,10 @@ class ConversationalSearchServiceClient {
|
|
352
331
|
options = options || {};
|
353
332
|
options.otherArgs = options.otherArgs || {};
|
354
333
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
355
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
356
|
-
|
357
|
-
name: request.name ?? '',
|
358
|
-
});
|
359
|
-
this.initialize().catch(err => {
|
360
|
-
throw err;
|
334
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
335
|
+
'name': request.name ?? '',
|
361
336
|
});
|
337
|
+
this.initialize().catch(err => { throw err; });
|
362
338
|
this._log.info('converseConversation request %j', request);
|
363
339
|
const wrappedCallback = callback
|
364
340
|
? (error, response, options, rawResponse) => {
|
@@ -366,11 +342,16 @@ class ConversationalSearchServiceClient {
|
|
366
342
|
callback(error, response, options, rawResponse); // We verified callback above.
|
367
343
|
}
|
368
344
|
: undefined;
|
369
|
-
return this.innerApiCalls
|
370
|
-
.converseConversation(request, options, wrappedCallback)
|
345
|
+
return this.innerApiCalls.converseConversation(request, options, wrappedCallback)
|
371
346
|
?.then(([response, options, rawResponse]) => {
|
372
347
|
this._log.info('converseConversation response %j', response);
|
373
348
|
return [response, options, rawResponse];
|
349
|
+
}).catch((error) => {
|
350
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
351
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
352
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
353
|
+
}
|
354
|
+
throw error;
|
374
355
|
});
|
375
356
|
}
|
376
357
|
createConversation(request, optionsOrCallback, callback) {
|
@@ -386,13 +367,10 @@ class ConversationalSearchServiceClient {
|
|
386
367
|
options = options || {};
|
387
368
|
options.otherArgs = options.otherArgs || {};
|
388
369
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
389
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
390
|
-
|
391
|
-
parent: request.parent ?? '',
|
392
|
-
});
|
393
|
-
this.initialize().catch(err => {
|
394
|
-
throw err;
|
370
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
371
|
+
'parent': request.parent ?? '',
|
395
372
|
});
|
373
|
+
this.initialize().catch(err => { throw err; });
|
396
374
|
this._log.info('createConversation request %j', request);
|
397
375
|
const wrappedCallback = callback
|
398
376
|
? (error, response, options, rawResponse) => {
|
@@ -400,11 +378,16 @@ class ConversationalSearchServiceClient {
|
|
400
378
|
callback(error, response, options, rawResponse); // We verified callback above.
|
401
379
|
}
|
402
380
|
: undefined;
|
403
|
-
return this.innerApiCalls
|
404
|
-
.createConversation(request, options, wrappedCallback)
|
381
|
+
return this.innerApiCalls.createConversation(request, options, wrappedCallback)
|
405
382
|
?.then(([response, options, rawResponse]) => {
|
406
383
|
this._log.info('createConversation response %j', response);
|
407
384
|
return [response, options, rawResponse];
|
385
|
+
}).catch((error) => {
|
386
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
387
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
388
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
389
|
+
}
|
390
|
+
throw error;
|
408
391
|
});
|
409
392
|
}
|
410
393
|
deleteConversation(request, optionsOrCallback, callback) {
|
@@ -420,13 +403,10 @@ class ConversationalSearchServiceClient {
|
|
420
403
|
options = options || {};
|
421
404
|
options.otherArgs = options.otherArgs || {};
|
422
405
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
423
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
424
|
-
|
425
|
-
name: request.name ?? '',
|
426
|
-
});
|
427
|
-
this.initialize().catch(err => {
|
428
|
-
throw err;
|
406
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
407
|
+
'name': request.name ?? '',
|
429
408
|
});
|
409
|
+
this.initialize().catch(err => { throw err; });
|
430
410
|
this._log.info('deleteConversation request %j', request);
|
431
411
|
const wrappedCallback = callback
|
432
412
|
? (error, response, options, rawResponse) => {
|
@@ -434,11 +414,16 @@ class ConversationalSearchServiceClient {
|
|
434
414
|
callback(error, response, options, rawResponse); // We verified callback above.
|
435
415
|
}
|
436
416
|
: undefined;
|
437
|
-
return this.innerApiCalls
|
438
|
-
.deleteConversation(request, options, wrappedCallback)
|
417
|
+
return this.innerApiCalls.deleteConversation(request, options, wrappedCallback)
|
439
418
|
?.then(([response, options, rawResponse]) => {
|
440
419
|
this._log.info('deleteConversation response %j', response);
|
441
420
|
return [response, options, rawResponse];
|
421
|
+
}).catch((error) => {
|
422
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
423
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
424
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
425
|
+
}
|
426
|
+
throw error;
|
442
427
|
});
|
443
428
|
}
|
444
429
|
updateConversation(request, optionsOrCallback, callback) {
|
@@ -454,13 +439,10 @@ class ConversationalSearchServiceClient {
|
|
454
439
|
options = options || {};
|
455
440
|
options.otherArgs = options.otherArgs || {};
|
456
441
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
457
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
458
|
-
|
459
|
-
'conversation.name': request.conversation.name ?? '',
|
460
|
-
});
|
461
|
-
this.initialize().catch(err => {
|
462
|
-
throw err;
|
442
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
443
|
+
'conversation.name': request.conversation.name ?? '',
|
463
444
|
});
|
445
|
+
this.initialize().catch(err => { throw err; });
|
464
446
|
this._log.info('updateConversation request %j', request);
|
465
447
|
const wrappedCallback = callback
|
466
448
|
? (error, response, options, rawResponse) => {
|
@@ -468,11 +450,16 @@ class ConversationalSearchServiceClient {
|
|
468
450
|
callback(error, response, options, rawResponse); // We verified callback above.
|
469
451
|
}
|
470
452
|
: undefined;
|
471
|
-
return this.innerApiCalls
|
472
|
-
.updateConversation(request, options, wrappedCallback)
|
453
|
+
return this.innerApiCalls.updateConversation(request, options, wrappedCallback)
|
473
454
|
?.then(([response, options, rawResponse]) => {
|
474
455
|
this._log.info('updateConversation response %j', response);
|
475
456
|
return [response, options, rawResponse];
|
457
|
+
}).catch((error) => {
|
458
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
459
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
460
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
461
|
+
}
|
462
|
+
throw error;
|
476
463
|
});
|
477
464
|
}
|
478
465
|
getConversation(request, optionsOrCallback, callback) {
|
@@ -488,13 +475,10 @@ class ConversationalSearchServiceClient {
|
|
488
475
|
options = options || {};
|
489
476
|
options.otherArgs = options.otherArgs || {};
|
490
477
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
491
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
492
|
-
|
493
|
-
name: request.name ?? '',
|
494
|
-
});
|
495
|
-
this.initialize().catch(err => {
|
496
|
-
throw err;
|
478
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
479
|
+
'name': request.name ?? '',
|
497
480
|
});
|
481
|
+
this.initialize().catch(err => { throw err; });
|
498
482
|
this._log.info('getConversation request %j', request);
|
499
483
|
const wrappedCallback = callback
|
500
484
|
? (error, response, options, rawResponse) => {
|
@@ -502,11 +486,16 @@ class ConversationalSearchServiceClient {
|
|
502
486
|
callback(error, response, options, rawResponse); // We verified callback above.
|
503
487
|
}
|
504
488
|
: undefined;
|
505
|
-
return this.innerApiCalls
|
506
|
-
.getConversation(request, options, wrappedCallback)
|
489
|
+
return this.innerApiCalls.getConversation(request, options, wrappedCallback)
|
507
490
|
?.then(([response, options, rawResponse]) => {
|
508
491
|
this._log.info('getConversation response %j', response);
|
509
492
|
return [response, options, rawResponse];
|
493
|
+
}).catch((error) => {
|
494
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
495
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
496
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
497
|
+
}
|
498
|
+
throw error;
|
510
499
|
});
|
511
500
|
}
|
512
501
|
answerQuery(request, optionsOrCallback, callback) {
|
@@ -522,13 +511,10 @@ class ConversationalSearchServiceClient {
|
|
522
511
|
options = options || {};
|
523
512
|
options.otherArgs = options.otherArgs || {};
|
524
513
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
525
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
526
|
-
|
527
|
-
serving_config: request.servingConfig ?? '',
|
528
|
-
});
|
529
|
-
this.initialize().catch(err => {
|
530
|
-
throw err;
|
514
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
515
|
+
'serving_config': request.servingConfig ?? '',
|
531
516
|
});
|
517
|
+
this.initialize().catch(err => { throw err; });
|
532
518
|
this._log.info('answerQuery request %j', request);
|
533
519
|
const wrappedCallback = callback
|
534
520
|
? (error, response, options, rawResponse) => {
|
@@ -536,11 +522,16 @@ class ConversationalSearchServiceClient {
|
|
536
522
|
callback(error, response, options, rawResponse); // We verified callback above.
|
537
523
|
}
|
538
524
|
: undefined;
|
539
|
-
return this.innerApiCalls
|
540
|
-
.answerQuery(request, options, wrappedCallback)
|
525
|
+
return this.innerApiCalls.answerQuery(request, options, wrappedCallback)
|
541
526
|
?.then(([response, options, rawResponse]) => {
|
542
527
|
this._log.info('answerQuery response %j', response);
|
543
528
|
return [response, options, rawResponse];
|
529
|
+
}).catch((error) => {
|
530
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
531
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
532
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
533
|
+
}
|
534
|
+
throw error;
|
544
535
|
});
|
545
536
|
}
|
546
537
|
getAnswer(request, optionsOrCallback, callback) {
|
@@ -556,13 +547,10 @@ class ConversationalSearchServiceClient {
|
|
556
547
|
options = options || {};
|
557
548
|
options.otherArgs = options.otherArgs || {};
|
558
549
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
559
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
560
|
-
|
561
|
-
name: request.name ?? '',
|
562
|
-
});
|
563
|
-
this.initialize().catch(err => {
|
564
|
-
throw err;
|
550
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
551
|
+
'name': request.name ?? '',
|
565
552
|
});
|
553
|
+
this.initialize().catch(err => { throw err; });
|
566
554
|
this._log.info('getAnswer request %j', request);
|
567
555
|
const wrappedCallback = callback
|
568
556
|
? (error, response, options, rawResponse) => {
|
@@ -570,11 +558,16 @@ class ConversationalSearchServiceClient {
|
|
570
558
|
callback(error, response, options, rawResponse); // We verified callback above.
|
571
559
|
}
|
572
560
|
: undefined;
|
573
|
-
return this.innerApiCalls
|
574
|
-
.getAnswer(request, options, wrappedCallback)
|
561
|
+
return this.innerApiCalls.getAnswer(request, options, wrappedCallback)
|
575
562
|
?.then(([response, options, rawResponse]) => {
|
576
563
|
this._log.info('getAnswer response %j', response);
|
577
564
|
return [response, options, rawResponse];
|
565
|
+
}).catch((error) => {
|
566
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
567
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
568
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
569
|
+
}
|
570
|
+
throw error;
|
578
571
|
});
|
579
572
|
}
|
580
573
|
createSession(request, optionsOrCallback, callback) {
|
@@ -590,13 +583,10 @@ class ConversationalSearchServiceClient {
|
|
590
583
|
options = options || {};
|
591
584
|
options.otherArgs = options.otherArgs || {};
|
592
585
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
593
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
594
|
-
|
595
|
-
parent: request.parent ?? '',
|
596
|
-
});
|
597
|
-
this.initialize().catch(err => {
|
598
|
-
throw err;
|
586
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
587
|
+
'parent': request.parent ?? '',
|
599
588
|
});
|
589
|
+
this.initialize().catch(err => { throw err; });
|
600
590
|
this._log.info('createSession request %j', request);
|
601
591
|
const wrappedCallback = callback
|
602
592
|
? (error, response, options, rawResponse) => {
|
@@ -604,11 +594,16 @@ class ConversationalSearchServiceClient {
|
|
604
594
|
callback(error, response, options, rawResponse); // We verified callback above.
|
605
595
|
}
|
606
596
|
: undefined;
|
607
|
-
return this.innerApiCalls
|
608
|
-
.createSession(request, options, wrappedCallback)
|
597
|
+
return this.innerApiCalls.createSession(request, options, wrappedCallback)
|
609
598
|
?.then(([response, options, rawResponse]) => {
|
610
599
|
this._log.info('createSession response %j', response);
|
611
600
|
return [response, options, rawResponse];
|
601
|
+
}).catch((error) => {
|
602
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
603
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
604
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
605
|
+
}
|
606
|
+
throw error;
|
612
607
|
});
|
613
608
|
}
|
614
609
|
deleteSession(request, optionsOrCallback, callback) {
|
@@ -624,13 +619,10 @@ class ConversationalSearchServiceClient {
|
|
624
619
|
options = options || {};
|
625
620
|
options.otherArgs = options.otherArgs || {};
|
626
621
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
627
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
628
|
-
|
629
|
-
name: request.name ?? '',
|
630
|
-
});
|
631
|
-
this.initialize().catch(err => {
|
632
|
-
throw err;
|
622
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
623
|
+
'name': request.name ?? '',
|
633
624
|
});
|
625
|
+
this.initialize().catch(err => { throw err; });
|
634
626
|
this._log.info('deleteSession request %j', request);
|
635
627
|
const wrappedCallback = callback
|
636
628
|
? (error, response, options, rawResponse) => {
|
@@ -638,11 +630,16 @@ class ConversationalSearchServiceClient {
|
|
638
630
|
callback(error, response, options, rawResponse); // We verified callback above.
|
639
631
|
}
|
640
632
|
: undefined;
|
641
|
-
return this.innerApiCalls
|
642
|
-
.deleteSession(request, options, wrappedCallback)
|
633
|
+
return this.innerApiCalls.deleteSession(request, options, wrappedCallback)
|
643
634
|
?.then(([response, options, rawResponse]) => {
|
644
635
|
this._log.info('deleteSession response %j', response);
|
645
636
|
return [response, options, rawResponse];
|
637
|
+
}).catch((error) => {
|
638
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
639
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
640
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
641
|
+
}
|
642
|
+
throw error;
|
646
643
|
});
|
647
644
|
}
|
648
645
|
updateSession(request, optionsOrCallback, callback) {
|
@@ -658,13 +655,10 @@ class ConversationalSearchServiceClient {
|
|
658
655
|
options = options || {};
|
659
656
|
options.otherArgs = options.otherArgs || {};
|
660
657
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
661
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
662
|
-
|
663
|
-
'session.name': request.session.name ?? '',
|
664
|
-
});
|
665
|
-
this.initialize().catch(err => {
|
666
|
-
throw err;
|
658
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
659
|
+
'session.name': request.session.name ?? '',
|
667
660
|
});
|
661
|
+
this.initialize().catch(err => { throw err; });
|
668
662
|
this._log.info('updateSession request %j', request);
|
669
663
|
const wrappedCallback = callback
|
670
664
|
? (error, response, options, rawResponse) => {
|
@@ -672,11 +666,16 @@ class ConversationalSearchServiceClient {
|
|
672
666
|
callback(error, response, options, rawResponse); // We verified callback above.
|
673
667
|
}
|
674
668
|
: undefined;
|
675
|
-
return this.innerApiCalls
|
676
|
-
.updateSession(request, options, wrappedCallback)
|
669
|
+
return this.innerApiCalls.updateSession(request, options, wrappedCallback)
|
677
670
|
?.then(([response, options, rawResponse]) => {
|
678
671
|
this._log.info('updateSession response %j', response);
|
679
672
|
return [response, options, rawResponse];
|
673
|
+
}).catch((error) => {
|
674
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
675
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
676
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
677
|
+
}
|
678
|
+
throw error;
|
680
679
|
});
|
681
680
|
}
|
682
681
|
getSession(request, optionsOrCallback, callback) {
|
@@ -692,13 +691,10 @@ class ConversationalSearchServiceClient {
|
|
692
691
|
options = options || {};
|
693
692
|
options.otherArgs = options.otherArgs || {};
|
694
693
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
695
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
696
|
-
|
697
|
-
name: request.name ?? '',
|
698
|
-
});
|
699
|
-
this.initialize().catch(err => {
|
700
|
-
throw err;
|
694
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
695
|
+
'name': request.name ?? '',
|
701
696
|
});
|
697
|
+
this.initialize().catch(err => { throw err; });
|
702
698
|
this._log.info('getSession request %j', request);
|
703
699
|
const wrappedCallback = callback
|
704
700
|
? (error, response, options, rawResponse) => {
|
@@ -706,11 +702,16 @@ class ConversationalSearchServiceClient {
|
|
706
702
|
callback(error, response, options, rawResponse); // We verified callback above.
|
707
703
|
}
|
708
704
|
: undefined;
|
709
|
-
return this.innerApiCalls
|
710
|
-
.getSession(request, options, wrappedCallback)
|
705
|
+
return this.innerApiCalls.getSession(request, options, wrappedCallback)
|
711
706
|
?.then(([response, options, rawResponse]) => {
|
712
707
|
this._log.info('getSession response %j', response);
|
713
708
|
return [response, options, rawResponse];
|
709
|
+
}).catch((error) => {
|
710
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
711
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
712
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
713
|
+
}
|
714
|
+
throw error;
|
714
715
|
});
|
715
716
|
}
|
716
717
|
listConversations(request, optionsOrCallback, callback) {
|
@@ -726,13 +727,10 @@ class ConversationalSearchServiceClient {
|
|
726
727
|
options = options || {};
|
727
728
|
options.otherArgs = options.otherArgs || {};
|
728
729
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
729
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
730
|
-
|
731
|
-
parent: request.parent ?? '',
|
732
|
-
});
|
733
|
-
this.initialize().catch(err => {
|
734
|
-
throw err;
|
730
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
731
|
+
'parent': request.parent ?? '',
|
735
732
|
});
|
733
|
+
this.initialize().catch(err => { throw err; });
|
736
734
|
const wrappedCallback = callback
|
737
735
|
? (error, values, nextPageRequest, rawResponse) => {
|
738
736
|
this._log.info('listConversations values %j', values);
|
@@ -793,15 +791,12 @@ class ConversationalSearchServiceClient {
|
|
793
791
|
options = options || {};
|
794
792
|
options.otherArgs = options.otherArgs || {};
|
795
793
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
796
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
797
|
-
|
798
|
-
|
799
|
-
});
|
794
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
795
|
+
'parent': request.parent ?? '',
|
796
|
+
});
|
800
797
|
const defaultCallSettings = this._defaults['listConversations'];
|
801
798
|
const callSettings = defaultCallSettings.merge(options);
|
802
|
-
this.initialize().catch(err => {
|
803
|
-
throw err;
|
804
|
-
});
|
799
|
+
this.initialize().catch(err => { throw err; });
|
805
800
|
this._log.info('listConversations stream %j', request);
|
806
801
|
return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
|
807
802
|
}
|
@@ -854,15 +849,12 @@ class ConversationalSearchServiceClient {
|
|
854
849
|
options = options || {};
|
855
850
|
options.otherArgs = options.otherArgs || {};
|
856
851
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
857
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
858
|
-
|
859
|
-
|
860
|
-
});
|
852
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
853
|
+
'parent': request.parent ?? '',
|
854
|
+
});
|
861
855
|
const defaultCallSettings = this._defaults['listConversations'];
|
862
856
|
const callSettings = defaultCallSettings.merge(options);
|
863
|
-
this.initialize().catch(err => {
|
864
|
-
throw err;
|
865
|
-
});
|
857
|
+
this.initialize().catch(err => { throw err; });
|
866
858
|
this._log.info('listConversations iterate %j', request);
|
867
859
|
return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
|
868
860
|
}
|
@@ -879,13 +871,10 @@ class ConversationalSearchServiceClient {
|
|
879
871
|
options = options || {};
|
880
872
|
options.otherArgs = options.otherArgs || {};
|
881
873
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
882
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
883
|
-
|
884
|
-
parent: request.parent ?? '',
|
885
|
-
});
|
886
|
-
this.initialize().catch(err => {
|
887
|
-
throw err;
|
874
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
875
|
+
'parent': request.parent ?? '',
|
888
876
|
});
|
877
|
+
this.initialize().catch(err => { throw err; });
|
889
878
|
const wrappedCallback = callback
|
890
879
|
? (error, values, nextPageRequest, rawResponse) => {
|
891
880
|
this._log.info('listSessions values %j', values);
|
@@ -946,15 +935,12 @@ class ConversationalSearchServiceClient {
|
|
946
935
|
options = options || {};
|
947
936
|
options.otherArgs = options.otherArgs || {};
|
948
937
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
949
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
950
|
-
|
951
|
-
|
952
|
-
});
|
938
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
939
|
+
'parent': request.parent ?? '',
|
940
|
+
});
|
953
941
|
const defaultCallSettings = this._defaults['listSessions'];
|
954
942
|
const callSettings = defaultCallSettings.merge(options);
|
955
|
-
this.initialize().catch(err => {
|
956
|
-
throw err;
|
957
|
-
});
|
943
|
+
this.initialize().catch(err => { throw err; });
|
958
944
|
this._log.info('listSessions stream %j', request);
|
959
945
|
return this.descriptors.page.listSessions.createStream(this.innerApiCalls.listSessions, request, callSettings);
|
960
946
|
}
|
@@ -1007,70 +993,67 @@ class ConversationalSearchServiceClient {
|
|
1007
993
|
options = options || {};
|
1008
994
|
options.otherArgs = options.otherArgs || {};
|
1009
995
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1010
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1011
|
-
|
1012
|
-
|
1013
|
-
});
|
996
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
997
|
+
'parent': request.parent ?? '',
|
998
|
+
});
|
1014
999
|
const defaultCallSettings = this._defaults['listSessions'];
|
1015
1000
|
const callSettings = defaultCallSettings.merge(options);
|
1016
|
-
this.initialize().catch(err => {
|
1017
|
-
throw err;
|
1018
|
-
});
|
1001
|
+
this.initialize().catch(err => { throw err; });
|
1019
1002
|
this._log.info('listSessions iterate %j', request);
|
1020
1003
|
return this.descriptors.page.listSessions.asyncIterate(this.innerApiCalls['listSessions'], request, callSettings);
|
1021
1004
|
}
|
1022
1005
|
/**
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1006
|
+
* Gets information about a location.
|
1007
|
+
*
|
1008
|
+
* @param {Object} request
|
1009
|
+
* The request object that will be sent.
|
1010
|
+
* @param {string} request.name
|
1011
|
+
* Resource name for the location.
|
1012
|
+
* @param {object} [options]
|
1013
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
1014
|
+
* @returns {Promise} - The promise which resolves to an array.
|
1015
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
1016
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
1017
|
+
* for more details and examples.
|
1018
|
+
* @example
|
1019
|
+
* ```
|
1020
|
+
* const [response] = await client.getLocation(request);
|
1021
|
+
* ```
|
1022
|
+
*/
|
1040
1023
|
getLocation(request, options, callback) {
|
1041
1024
|
return this.locationsClient.getLocation(request, options, callback);
|
1042
1025
|
}
|
1043
1026
|
/**
|
1044
|
-
|
1045
|
-
|
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
|
-
|
1027
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
1028
|
+
*
|
1029
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
1030
|
+
* @param {Object} request
|
1031
|
+
* The request object that will be sent.
|
1032
|
+
* @param {string} request.name
|
1033
|
+
* The resource that owns the locations collection, if applicable.
|
1034
|
+
* @param {string} request.filter
|
1035
|
+
* The standard list filter.
|
1036
|
+
* @param {number} request.pageSize
|
1037
|
+
* The standard list page size.
|
1038
|
+
* @param {string} request.pageToken
|
1039
|
+
* The standard list page token.
|
1040
|
+
* @param {object} [options]
|
1041
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1042
|
+
* @returns {Object}
|
1043
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1044
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1045
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1046
|
+
* so you can stop the iteration when you don't need more results.
|
1047
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1048
|
+
* for more details and examples.
|
1049
|
+
* @example
|
1050
|
+
* ```
|
1051
|
+
* const iterable = client.listLocationsAsync(request);
|
1052
|
+
* for await (const response of iterable) {
|
1053
|
+
* // process response
|
1054
|
+
* }
|
1055
|
+
* ```
|
1056
|
+
*/
|
1074
1057
|
listLocationsAsync(request, options) {
|
1075
1058
|
return this.locationsClient.listLocationsAsync(request, options);
|
1076
1059
|
}
|
@@ -1098,8 +1081,7 @@ class ConversationalSearchServiceClient {
|
|
1098
1081
|
* @returns {string} A string representing the project.
|
1099
1082
|
*/
|
1100
1083
|
matchProjectFromAclConfigName(aclConfigName) {
|
1101
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1102
|
-
.project;
|
1084
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1103
1085
|
}
|
1104
1086
|
/**
|
1105
1087
|
* Parse the location from AclConfig resource.
|
@@ -1109,8 +1091,7 @@ class ConversationalSearchServiceClient {
|
|
1109
1091
|
* @returns {string} A string representing the location.
|
1110
1092
|
*/
|
1111
1093
|
matchLocationFromAclConfigName(aclConfigName) {
|
1112
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1113
|
-
.location;
|
1094
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1114
1095
|
}
|
1115
1096
|
/**
|
1116
1097
|
* Return a fully-qualified engine resource name string.
|
@@ -1192,8 +1173,7 @@ class ConversationalSearchServiceClient {
|
|
1192
1173
|
* @returns {string} A string representing the project.
|
1193
1174
|
*/
|
1194
1175
|
matchProjectFromEvaluationName(evaluationName) {
|
1195
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1196
|
-
.project;
|
1176
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1197
1177
|
}
|
1198
1178
|
/**
|
1199
1179
|
* Parse the location from Evaluation resource.
|
@@ -1203,8 +1183,7 @@ class ConversationalSearchServiceClient {
|
|
1203
1183
|
* @returns {string} A string representing the location.
|
1204
1184
|
*/
|
1205
1185
|
matchLocationFromEvaluationName(evaluationName) {
|
1206
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1207
|
-
.location;
|
1186
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1208
1187
|
}
|
1209
1188
|
/**
|
1210
1189
|
* Parse the evaluation from Evaluation resource.
|
@@ -1214,8 +1193,7 @@ class ConversationalSearchServiceClient {
|
|
1214
1193
|
* @returns {string} A string representing the evaluation.
|
1215
1194
|
*/
|
1216
1195
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1217
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1218
|
-
.evaluation;
|
1196
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1219
1197
|
}
|
1220
1198
|
/**
|
1221
1199
|
* Return a fully-qualified project resource name string.
|
@@ -3282,8 +3260,7 @@ class ConversationalSearchServiceClient {
|
|
3282
3260
|
* @returns {string} A string representing the project.
|
3283
3261
|
*/
|
3284
3262
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3285
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3286
|
-
.project;
|
3263
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3287
3264
|
}
|
3288
3265
|
/**
|
3289
3266
|
* Parse the location from SampleQuery resource.
|
@@ -3293,8 +3270,7 @@ class ConversationalSearchServiceClient {
|
|
3293
3270
|
* @returns {string} A string representing the location.
|
3294
3271
|
*/
|
3295
3272
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3296
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3297
|
-
.location;
|
3273
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3298
3274
|
}
|
3299
3275
|
/**
|
3300
3276
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3304,8 +3280,7 @@ class ConversationalSearchServiceClient {
|
|
3304
3280
|
* @returns {string} A string representing the sample_query_set.
|
3305
3281
|
*/
|
3306
3282
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3307
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3308
|
-
.sample_query_set;
|
3283
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3309
3284
|
}
|
3310
3285
|
/**
|
3311
3286
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3315,8 +3290,7 @@ class ConversationalSearchServiceClient {
|
|
3315
3290
|
* @returns {string} A string representing the sample_query.
|
3316
3291
|
*/
|
3317
3292
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3318
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3319
|
-
.sample_query;
|
3293
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3320
3294
|
}
|
3321
3295
|
/**
|
3322
3296
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3375,7 +3349,7 @@ class ConversationalSearchServiceClient {
|
|
3375
3349
|
this._log.info('ending gRPC channel');
|
3376
3350
|
this._terminated = true;
|
3377
3351
|
stub.close();
|
3378
|
-
this.locationsClient.close();
|
3352
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3379
3353
|
});
|
3380
3354
|
}
|
3381
3355
|
return Promise.resolve();
|