@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
@@ -97,28 +97,18 @@ class ConversationalSearchServiceClient {
|
|
97
97
|
*/
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
|
-
const staticMembers = this
|
101
|
-
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
const staticMembers = this.constructor;
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
103
|
}
|
107
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
108
|
-
|
109
|
-
: undefined;
|
110
|
-
this._universeDomain =
|
111
|
-
opts?.universeDomain ??
|
112
|
-
opts?.universe_domain ??
|
113
|
-
universeDomainEnvVar ??
|
114
|
-
'googleapis.com';
|
104
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
105
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
115
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
109
|
const port = opts?.port || staticMembers.port;
|
119
110
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
113
|
// Request numeric enum values if REST transport is used.
|
124
114
|
opts.numericEnums = true;
|
@@ -148,7 +138,10 @@ class ConversationalSearchServiceClient {
|
|
148
138
|
}
|
149
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
140
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
152
145
|
if (typeof process === 'object' && 'versions' in process) {
|
153
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
147
|
}
|
@@ -171,7 +164,10 @@ class ConversationalSearchServiceClient {
|
|
171
164
|
// Create useful helper objects for these.
|
172
165
|
this.pathTemplates = {
|
173
166
|
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
167
|
+
identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
|
174
168
|
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
169
|
+
projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
|
170
|
+
projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
|
175
171
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
176
172
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
177
173
|
projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
|
@@ -211,12 +207,12 @@ class ConversationalSearchServiceClient {
|
|
211
207
|
// pages). Denote the keys used for pagination and results.
|
212
208
|
this.descriptors.page = {
|
213
209
|
listConversations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'),
|
214
|
-
listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
|
210
|
+
listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
|
215
211
|
};
|
216
212
|
// Some of the methods on this service provide streaming responses.
|
217
213
|
// Provide descriptors for these.
|
218
214
|
this.descriptors.stream = {
|
219
|
-
streamAnswerQuery: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries)
|
215
|
+
streamAnswerQuery: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries)
|
220
216
|
};
|
221
217
|
// Put together the default options sent with requests.
|
222
218
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.ConversationalSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -245,29 +241,13 @@ class ConversationalSearchServiceClient {
|
|
245
241
|
}
|
246
242
|
// Put together the "service stub" for
|
247
243
|
// google.cloud.discoveryengine.v1.ConversationalSearchService.
|
248
|
-
this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
.ConversationalSearchService, this._opts, this._providedCustomServicePath);
|
244
|
+
this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
245
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.ConversationalSearchService') :
|
246
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
247
|
+
this._protos.google.cloud.discoveryengine.v1.ConversationalSearchService, this._opts, this._providedCustomServicePath);
|
253
248
|
// Iterate over each of the methods that the service provides
|
254
249
|
// and create an API call method for each.
|
255
|
-
const conversationalSearchServiceStubMethods = [
|
256
|
-
'converseConversation',
|
257
|
-
'createConversation',
|
258
|
-
'deleteConversation',
|
259
|
-
'updateConversation',
|
260
|
-
'getConversation',
|
261
|
-
'listConversations',
|
262
|
-
'answerQuery',
|
263
|
-
'streamAnswerQuery',
|
264
|
-
'getAnswer',
|
265
|
-
'createSession',
|
266
|
-
'deleteSession',
|
267
|
-
'updateSession',
|
268
|
-
'getSession',
|
269
|
-
'listSessions',
|
270
|
-
];
|
250
|
+
const conversationalSearchServiceStubMethods = ['converseConversation', 'createConversation', 'deleteConversation', 'updateConversation', 'getConversation', 'listConversations', 'answerQuery', 'streamAnswerQuery', 'getAnswer', 'createSession', 'deleteSession', 'updateSession', 'getSession', 'listSessions'];
|
271
251
|
for (const methodName of conversationalSearchServiceStubMethods) {
|
272
252
|
const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
|
273
253
|
if (this._terminated) {
|
@@ -299,8 +279,7 @@ class ConversationalSearchServiceClient {
|
|
299
279
|
* @returns {string} The DNS address for this service.
|
300
280
|
*/
|
301
281
|
static get servicePath() {
|
302
|
-
if (typeof process === 'object' &&
|
303
|
-
typeof process.emitWarning === 'function') {
|
282
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
304
283
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
305
284
|
}
|
306
285
|
return 'discoveryengine.googleapis.com';
|
@@ -311,8 +290,7 @@ class ConversationalSearchServiceClient {
|
|
311
290
|
* @returns {string} The DNS address for this service.
|
312
291
|
*/
|
313
292
|
static get apiEndpoint() {
|
314
|
-
if (typeof process === 'object' &&
|
315
|
-
typeof process.emitWarning === 'function') {
|
293
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
316
294
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
317
295
|
}
|
318
296
|
return 'discoveryengine.googleapis.com';
|
@@ -340,7 +318,9 @@ class ConversationalSearchServiceClient {
|
|
340
318
|
* @returns {string[]} List of default scopes.
|
341
319
|
*/
|
342
320
|
static get scopes() {
|
343
|
-
return [
|
321
|
+
return [
|
322
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
323
|
+
];
|
344
324
|
}
|
345
325
|
/**
|
346
326
|
* Return the project ID used by this class.
|
@@ -366,13 +346,10 @@ class ConversationalSearchServiceClient {
|
|
366
346
|
options = options || {};
|
367
347
|
options.otherArgs = options.otherArgs || {};
|
368
348
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
369
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
370
|
-
|
371
|
-
name: request.name ?? '',
|
372
|
-
});
|
373
|
-
this.initialize().catch(err => {
|
374
|
-
throw err;
|
349
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
350
|
+
'name': request.name ?? '',
|
375
351
|
});
|
352
|
+
this.initialize().catch(err => { throw err; });
|
376
353
|
this._log.info('converseConversation request %j', request);
|
377
354
|
const wrappedCallback = callback
|
378
355
|
? (error, response, options, rawResponse) => {
|
@@ -380,11 +357,16 @@ class ConversationalSearchServiceClient {
|
|
380
357
|
callback(error, response, options, rawResponse); // We verified callback above.
|
381
358
|
}
|
382
359
|
: undefined;
|
383
|
-
return this.innerApiCalls
|
384
|
-
.converseConversation(request, options, wrappedCallback)
|
360
|
+
return this.innerApiCalls.converseConversation(request, options, wrappedCallback)
|
385
361
|
?.then(([response, options, rawResponse]) => {
|
386
362
|
this._log.info('converseConversation response %j', response);
|
387
363
|
return [response, options, rawResponse];
|
364
|
+
}).catch((error) => {
|
365
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
366
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
367
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
368
|
+
}
|
369
|
+
throw error;
|
388
370
|
});
|
389
371
|
}
|
390
372
|
createConversation(request, optionsOrCallback, callback) {
|
@@ -400,13 +382,10 @@ class ConversationalSearchServiceClient {
|
|
400
382
|
options = options || {};
|
401
383
|
options.otherArgs = options.otherArgs || {};
|
402
384
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
403
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
404
|
-
|
405
|
-
parent: request.parent ?? '',
|
406
|
-
});
|
407
|
-
this.initialize().catch(err => {
|
408
|
-
throw err;
|
385
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
386
|
+
'parent': request.parent ?? '',
|
409
387
|
});
|
388
|
+
this.initialize().catch(err => { throw err; });
|
410
389
|
this._log.info('createConversation request %j', request);
|
411
390
|
const wrappedCallback = callback
|
412
391
|
? (error, response, options, rawResponse) => {
|
@@ -414,11 +393,16 @@ class ConversationalSearchServiceClient {
|
|
414
393
|
callback(error, response, options, rawResponse); // We verified callback above.
|
415
394
|
}
|
416
395
|
: undefined;
|
417
|
-
return this.innerApiCalls
|
418
|
-
.createConversation(request, options, wrappedCallback)
|
396
|
+
return this.innerApiCalls.createConversation(request, options, wrappedCallback)
|
419
397
|
?.then(([response, options, rawResponse]) => {
|
420
398
|
this._log.info('createConversation response %j', response);
|
421
399
|
return [response, options, rawResponse];
|
400
|
+
}).catch((error) => {
|
401
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
402
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
403
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
404
|
+
}
|
405
|
+
throw error;
|
422
406
|
});
|
423
407
|
}
|
424
408
|
deleteConversation(request, optionsOrCallback, callback) {
|
@@ -434,13 +418,10 @@ class ConversationalSearchServiceClient {
|
|
434
418
|
options = options || {};
|
435
419
|
options.otherArgs = options.otherArgs || {};
|
436
420
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
437
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
438
|
-
|
439
|
-
name: request.name ?? '',
|
440
|
-
});
|
441
|
-
this.initialize().catch(err => {
|
442
|
-
throw err;
|
421
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
422
|
+
'name': request.name ?? '',
|
443
423
|
});
|
424
|
+
this.initialize().catch(err => { throw err; });
|
444
425
|
this._log.info('deleteConversation request %j', request);
|
445
426
|
const wrappedCallback = callback
|
446
427
|
? (error, response, options, rawResponse) => {
|
@@ -448,11 +429,16 @@ class ConversationalSearchServiceClient {
|
|
448
429
|
callback(error, response, options, rawResponse); // We verified callback above.
|
449
430
|
}
|
450
431
|
: undefined;
|
451
|
-
return this.innerApiCalls
|
452
|
-
.deleteConversation(request, options, wrappedCallback)
|
432
|
+
return this.innerApiCalls.deleteConversation(request, options, wrappedCallback)
|
453
433
|
?.then(([response, options, rawResponse]) => {
|
454
434
|
this._log.info('deleteConversation response %j', response);
|
455
435
|
return [response, options, rawResponse];
|
436
|
+
}).catch((error) => {
|
437
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
438
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
439
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
440
|
+
}
|
441
|
+
throw error;
|
456
442
|
});
|
457
443
|
}
|
458
444
|
updateConversation(request, optionsOrCallback, callback) {
|
@@ -468,13 +454,10 @@ class ConversationalSearchServiceClient {
|
|
468
454
|
options = options || {};
|
469
455
|
options.otherArgs = options.otherArgs || {};
|
470
456
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
471
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
472
|
-
|
473
|
-
'conversation.name': request.conversation.name ?? '',
|
474
|
-
});
|
475
|
-
this.initialize().catch(err => {
|
476
|
-
throw err;
|
457
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
458
|
+
'conversation.name': request.conversation.name ?? '',
|
477
459
|
});
|
460
|
+
this.initialize().catch(err => { throw err; });
|
478
461
|
this._log.info('updateConversation request %j', request);
|
479
462
|
const wrappedCallback = callback
|
480
463
|
? (error, response, options, rawResponse) => {
|
@@ -482,11 +465,16 @@ class ConversationalSearchServiceClient {
|
|
482
465
|
callback(error, response, options, rawResponse); // We verified callback above.
|
483
466
|
}
|
484
467
|
: undefined;
|
485
|
-
return this.innerApiCalls
|
486
|
-
.updateConversation(request, options, wrappedCallback)
|
468
|
+
return this.innerApiCalls.updateConversation(request, options, wrappedCallback)
|
487
469
|
?.then(([response, options, rawResponse]) => {
|
488
470
|
this._log.info('updateConversation response %j', response);
|
489
471
|
return [response, options, rawResponse];
|
472
|
+
}).catch((error) => {
|
473
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
474
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
475
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
476
|
+
}
|
477
|
+
throw error;
|
490
478
|
});
|
491
479
|
}
|
492
480
|
getConversation(request, optionsOrCallback, callback) {
|
@@ -502,13 +490,10 @@ class ConversationalSearchServiceClient {
|
|
502
490
|
options = options || {};
|
503
491
|
options.otherArgs = options.otherArgs || {};
|
504
492
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
505
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
506
|
-
|
507
|
-
name: request.name ?? '',
|
508
|
-
});
|
509
|
-
this.initialize().catch(err => {
|
510
|
-
throw err;
|
493
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
494
|
+
'name': request.name ?? '',
|
511
495
|
});
|
496
|
+
this.initialize().catch(err => { throw err; });
|
512
497
|
this._log.info('getConversation request %j', request);
|
513
498
|
const wrappedCallback = callback
|
514
499
|
? (error, response, options, rawResponse) => {
|
@@ -516,11 +501,16 @@ class ConversationalSearchServiceClient {
|
|
516
501
|
callback(error, response, options, rawResponse); // We verified callback above.
|
517
502
|
}
|
518
503
|
: undefined;
|
519
|
-
return this.innerApiCalls
|
520
|
-
.getConversation(request, options, wrappedCallback)
|
504
|
+
return this.innerApiCalls.getConversation(request, options, wrappedCallback)
|
521
505
|
?.then(([response, options, rawResponse]) => {
|
522
506
|
this._log.info('getConversation response %j', response);
|
523
507
|
return [response, options, rawResponse];
|
508
|
+
}).catch((error) => {
|
509
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
510
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
511
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
512
|
+
}
|
513
|
+
throw error;
|
524
514
|
});
|
525
515
|
}
|
526
516
|
answerQuery(request, optionsOrCallback, callback) {
|
@@ -536,13 +526,10 @@ class ConversationalSearchServiceClient {
|
|
536
526
|
options = options || {};
|
537
527
|
options.otherArgs = options.otherArgs || {};
|
538
528
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
539
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
540
|
-
|
541
|
-
serving_config: request.servingConfig ?? '',
|
542
|
-
});
|
543
|
-
this.initialize().catch(err => {
|
544
|
-
throw err;
|
529
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
530
|
+
'serving_config': request.servingConfig ?? '',
|
545
531
|
});
|
532
|
+
this.initialize().catch(err => { throw err; });
|
546
533
|
this._log.info('answerQuery request %j', request);
|
547
534
|
const wrappedCallback = callback
|
548
535
|
? (error, response, options, rawResponse) => {
|
@@ -550,11 +537,16 @@ class ConversationalSearchServiceClient {
|
|
550
537
|
callback(error, response, options, rawResponse); // We verified callback above.
|
551
538
|
}
|
552
539
|
: undefined;
|
553
|
-
return this.innerApiCalls
|
554
|
-
.answerQuery(request, options, wrappedCallback)
|
540
|
+
return this.innerApiCalls.answerQuery(request, options, wrappedCallback)
|
555
541
|
?.then(([response, options, rawResponse]) => {
|
556
542
|
this._log.info('answerQuery response %j', response);
|
557
543
|
return [response, options, rawResponse];
|
544
|
+
}).catch((error) => {
|
545
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
546
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
547
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
548
|
+
}
|
549
|
+
throw error;
|
558
550
|
});
|
559
551
|
}
|
560
552
|
getAnswer(request, optionsOrCallback, callback) {
|
@@ -570,13 +562,10 @@ class ConversationalSearchServiceClient {
|
|
570
562
|
options = options || {};
|
571
563
|
options.otherArgs = options.otherArgs || {};
|
572
564
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
573
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
574
|
-
|
575
|
-
name: request.name ?? '',
|
576
|
-
});
|
577
|
-
this.initialize().catch(err => {
|
578
|
-
throw err;
|
565
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
566
|
+
'name': request.name ?? '',
|
579
567
|
});
|
568
|
+
this.initialize().catch(err => { throw err; });
|
580
569
|
this._log.info('getAnswer request %j', request);
|
581
570
|
const wrappedCallback = callback
|
582
571
|
? (error, response, options, rawResponse) => {
|
@@ -584,11 +573,16 @@ class ConversationalSearchServiceClient {
|
|
584
573
|
callback(error, response, options, rawResponse); // We verified callback above.
|
585
574
|
}
|
586
575
|
: undefined;
|
587
|
-
return this.innerApiCalls
|
588
|
-
.getAnswer(request, options, wrappedCallback)
|
576
|
+
return this.innerApiCalls.getAnswer(request, options, wrappedCallback)
|
589
577
|
?.then(([response, options, rawResponse]) => {
|
590
578
|
this._log.info('getAnswer response %j', response);
|
591
579
|
return [response, options, rawResponse];
|
580
|
+
}).catch((error) => {
|
581
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
582
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
583
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
584
|
+
}
|
585
|
+
throw error;
|
592
586
|
});
|
593
587
|
}
|
594
588
|
createSession(request, optionsOrCallback, callback) {
|
@@ -604,13 +598,10 @@ class ConversationalSearchServiceClient {
|
|
604
598
|
options = options || {};
|
605
599
|
options.otherArgs = options.otherArgs || {};
|
606
600
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
607
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
608
|
-
|
609
|
-
parent: request.parent ?? '',
|
610
|
-
});
|
611
|
-
this.initialize().catch(err => {
|
612
|
-
throw err;
|
601
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
602
|
+
'parent': request.parent ?? '',
|
613
603
|
});
|
604
|
+
this.initialize().catch(err => { throw err; });
|
614
605
|
this._log.info('createSession request %j', request);
|
615
606
|
const wrappedCallback = callback
|
616
607
|
? (error, response, options, rawResponse) => {
|
@@ -618,11 +609,16 @@ class ConversationalSearchServiceClient {
|
|
618
609
|
callback(error, response, options, rawResponse); // We verified callback above.
|
619
610
|
}
|
620
611
|
: undefined;
|
621
|
-
return this.innerApiCalls
|
622
|
-
.createSession(request, options, wrappedCallback)
|
612
|
+
return this.innerApiCalls.createSession(request, options, wrappedCallback)
|
623
613
|
?.then(([response, options, rawResponse]) => {
|
624
614
|
this._log.info('createSession response %j', response);
|
625
615
|
return [response, options, rawResponse];
|
616
|
+
}).catch((error) => {
|
617
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
618
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
619
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
620
|
+
}
|
621
|
+
throw error;
|
626
622
|
});
|
627
623
|
}
|
628
624
|
deleteSession(request, optionsOrCallback, callback) {
|
@@ -638,13 +634,10 @@ class ConversationalSearchServiceClient {
|
|
638
634
|
options = options || {};
|
639
635
|
options.otherArgs = options.otherArgs || {};
|
640
636
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
641
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
642
|
-
|
643
|
-
name: request.name ?? '',
|
644
|
-
});
|
645
|
-
this.initialize().catch(err => {
|
646
|
-
throw err;
|
637
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
638
|
+
'name': request.name ?? '',
|
647
639
|
});
|
640
|
+
this.initialize().catch(err => { throw err; });
|
648
641
|
this._log.info('deleteSession request %j', request);
|
649
642
|
const wrappedCallback = callback
|
650
643
|
? (error, response, options, rawResponse) => {
|
@@ -652,11 +645,16 @@ class ConversationalSearchServiceClient {
|
|
652
645
|
callback(error, response, options, rawResponse); // We verified callback above.
|
653
646
|
}
|
654
647
|
: undefined;
|
655
|
-
return this.innerApiCalls
|
656
|
-
.deleteSession(request, options, wrappedCallback)
|
648
|
+
return this.innerApiCalls.deleteSession(request, options, wrappedCallback)
|
657
649
|
?.then(([response, options, rawResponse]) => {
|
658
650
|
this._log.info('deleteSession response %j', response);
|
659
651
|
return [response, options, rawResponse];
|
652
|
+
}).catch((error) => {
|
653
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
654
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
655
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
656
|
+
}
|
657
|
+
throw error;
|
660
658
|
});
|
661
659
|
}
|
662
660
|
updateSession(request, optionsOrCallback, callback) {
|
@@ -672,13 +670,10 @@ class ConversationalSearchServiceClient {
|
|
672
670
|
options = options || {};
|
673
671
|
options.otherArgs = options.otherArgs || {};
|
674
672
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
675
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
676
|
-
|
677
|
-
'session.name': request.session.name ?? '',
|
678
|
-
});
|
679
|
-
this.initialize().catch(err => {
|
680
|
-
throw err;
|
673
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
674
|
+
'session.name': request.session.name ?? '',
|
681
675
|
});
|
676
|
+
this.initialize().catch(err => { throw err; });
|
682
677
|
this._log.info('updateSession request %j', request);
|
683
678
|
const wrappedCallback = callback
|
684
679
|
? (error, response, options, rawResponse) => {
|
@@ -686,11 +681,16 @@ class ConversationalSearchServiceClient {
|
|
686
681
|
callback(error, response, options, rawResponse); // We verified callback above.
|
687
682
|
}
|
688
683
|
: undefined;
|
689
|
-
return this.innerApiCalls
|
690
|
-
.updateSession(request, options, wrappedCallback)
|
684
|
+
return this.innerApiCalls.updateSession(request, options, wrappedCallback)
|
691
685
|
?.then(([response, options, rawResponse]) => {
|
692
686
|
this._log.info('updateSession response %j', response);
|
693
687
|
return [response, options, rawResponse];
|
688
|
+
}).catch((error) => {
|
689
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
690
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
691
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
692
|
+
}
|
693
|
+
throw error;
|
694
694
|
});
|
695
695
|
}
|
696
696
|
getSession(request, optionsOrCallback, callback) {
|
@@ -706,13 +706,10 @@ class ConversationalSearchServiceClient {
|
|
706
706
|
options = options || {};
|
707
707
|
options.otherArgs = options.otherArgs || {};
|
708
708
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
709
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
710
|
-
|
711
|
-
name: request.name ?? '',
|
712
|
-
});
|
713
|
-
this.initialize().catch(err => {
|
714
|
-
throw err;
|
709
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
710
|
+
'name': request.name ?? '',
|
715
711
|
});
|
712
|
+
this.initialize().catch(err => { throw err; });
|
716
713
|
this._log.info('getSession request %j', request);
|
717
714
|
const wrappedCallback = callback
|
718
715
|
? (error, response, options, rawResponse) => {
|
@@ -720,11 +717,16 @@ class ConversationalSearchServiceClient {
|
|
720
717
|
callback(error, response, options, rawResponse); // We verified callback above.
|
721
718
|
}
|
722
719
|
: undefined;
|
723
|
-
return this.innerApiCalls
|
724
|
-
.getSession(request, options, wrappedCallback)
|
720
|
+
return this.innerApiCalls.getSession(request, options, wrappedCallback)
|
725
721
|
?.then(([response, options, rawResponse]) => {
|
726
722
|
this._log.info('getSession response %j', response);
|
727
723
|
return [response, options, rawResponse];
|
724
|
+
}).catch((error) => {
|
725
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
726
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
727
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
728
|
+
}
|
729
|
+
throw error;
|
728
730
|
});
|
729
731
|
}
|
730
732
|
/**
|
@@ -823,13 +825,10 @@ class ConversationalSearchServiceClient {
|
|
823
825
|
options = options || {};
|
824
826
|
options.otherArgs = options.otherArgs || {};
|
825
827
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
826
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
827
|
-
|
828
|
-
serving_config: request.servingConfig ?? '',
|
829
|
-
});
|
830
|
-
this.initialize().catch(err => {
|
831
|
-
throw err;
|
828
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
829
|
+
'serving_config': request.servingConfig ?? '',
|
832
830
|
});
|
831
|
+
this.initialize().catch(err => { throw err; });
|
833
832
|
this._log.info('streamAnswerQuery stream %j', options);
|
834
833
|
return this.innerApiCalls.streamAnswerQuery(request, options);
|
835
834
|
}
|
@@ -846,13 +845,10 @@ class ConversationalSearchServiceClient {
|
|
846
845
|
options = options || {};
|
847
846
|
options.otherArgs = options.otherArgs || {};
|
848
847
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
849
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
850
|
-
|
851
|
-
parent: request.parent ?? '',
|
852
|
-
});
|
853
|
-
this.initialize().catch(err => {
|
854
|
-
throw err;
|
848
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
849
|
+
'parent': request.parent ?? '',
|
855
850
|
});
|
851
|
+
this.initialize().catch(err => { throw err; });
|
856
852
|
const wrappedCallback = callback
|
857
853
|
? (error, values, nextPageRequest, rawResponse) => {
|
858
854
|
this._log.info('listConversations values %j', values);
|
@@ -913,15 +909,12 @@ class ConversationalSearchServiceClient {
|
|
913
909
|
options = options || {};
|
914
910
|
options.otherArgs = options.otherArgs || {};
|
915
911
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
916
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
917
|
-
|
918
|
-
|
919
|
-
});
|
912
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
913
|
+
'parent': request.parent ?? '',
|
914
|
+
});
|
920
915
|
const defaultCallSettings = this._defaults['listConversations'];
|
921
916
|
const callSettings = defaultCallSettings.merge(options);
|
922
|
-
this.initialize().catch(err => {
|
923
|
-
throw err;
|
924
|
-
});
|
917
|
+
this.initialize().catch(err => { throw err; });
|
925
918
|
this._log.info('listConversations stream %j', request);
|
926
919
|
return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
|
927
920
|
}
|
@@ -974,15 +967,12 @@ class ConversationalSearchServiceClient {
|
|
974
967
|
options = options || {};
|
975
968
|
options.otherArgs = options.otherArgs || {};
|
976
969
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
977
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
978
|
-
|
979
|
-
|
980
|
-
});
|
970
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
971
|
+
'parent': request.parent ?? '',
|
972
|
+
});
|
981
973
|
const defaultCallSettings = this._defaults['listConversations'];
|
982
974
|
const callSettings = defaultCallSettings.merge(options);
|
983
|
-
this.initialize().catch(err => {
|
984
|
-
throw err;
|
985
|
-
});
|
975
|
+
this.initialize().catch(err => { throw err; });
|
986
976
|
this._log.info('listConversations iterate %j', request);
|
987
977
|
return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
|
988
978
|
}
|
@@ -999,13 +989,10 @@ class ConversationalSearchServiceClient {
|
|
999
989
|
options = options || {};
|
1000
990
|
options.otherArgs = options.otherArgs || {};
|
1001
991
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1002
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1003
|
-
|
1004
|
-
parent: request.parent ?? '',
|
1005
|
-
});
|
1006
|
-
this.initialize().catch(err => {
|
1007
|
-
throw err;
|
992
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
993
|
+
'parent': request.parent ?? '',
|
1008
994
|
});
|
995
|
+
this.initialize().catch(err => { throw err; });
|
1009
996
|
const wrappedCallback = callback
|
1010
997
|
? (error, values, nextPageRequest, rawResponse) => {
|
1011
998
|
this._log.info('listSessions values %j', values);
|
@@ -1071,15 +1058,12 @@ class ConversationalSearchServiceClient {
|
|
1071
1058
|
options = options || {};
|
1072
1059
|
options.otherArgs = options.otherArgs || {};
|
1073
1060
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1074
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1075
|
-
|
1076
|
-
|
1077
|
-
});
|
1061
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1062
|
+
'parent': request.parent ?? '',
|
1063
|
+
});
|
1078
1064
|
const defaultCallSettings = this._defaults['listSessions'];
|
1079
1065
|
const callSettings = defaultCallSettings.merge(options);
|
1080
|
-
this.initialize().catch(err => {
|
1081
|
-
throw err;
|
1082
|
-
});
|
1066
|
+
this.initialize().catch(err => { throw err; });
|
1083
1067
|
this._log.info('listSessions stream %j', request);
|
1084
1068
|
return this.descriptors.page.listSessions.createStream(this.innerApiCalls.listSessions, request, callSettings);
|
1085
1069
|
}
|
@@ -1137,70 +1121,67 @@ class ConversationalSearchServiceClient {
|
|
1137
1121
|
options = options || {};
|
1138
1122
|
options.otherArgs = options.otherArgs || {};
|
1139
1123
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1140
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1141
|
-
|
1142
|
-
|
1143
|
-
});
|
1124
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1125
|
+
'parent': request.parent ?? '',
|
1126
|
+
});
|
1144
1127
|
const defaultCallSettings = this._defaults['listSessions'];
|
1145
1128
|
const callSettings = defaultCallSettings.merge(options);
|
1146
|
-
this.initialize().catch(err => {
|
1147
|
-
throw err;
|
1148
|
-
});
|
1129
|
+
this.initialize().catch(err => { throw err; });
|
1149
1130
|
this._log.info('listSessions iterate %j', request);
|
1150
1131
|
return this.descriptors.page.listSessions.asyncIterate(this.innerApiCalls['listSessions'], request, callSettings);
|
1151
1132
|
}
|
1152
1133
|
/**
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1134
|
+
* Gets information about a location.
|
1135
|
+
*
|
1136
|
+
* @param {Object} request
|
1137
|
+
* The request object that will be sent.
|
1138
|
+
* @param {string} request.name
|
1139
|
+
* Resource name for the location.
|
1140
|
+
* @param {object} [options]
|
1141
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
1142
|
+
* @returns {Promise} - The promise which resolves to an array.
|
1143
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
1144
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
1145
|
+
* for more details and examples.
|
1146
|
+
* @example
|
1147
|
+
* ```
|
1148
|
+
* const [response] = await client.getLocation(request);
|
1149
|
+
* ```
|
1150
|
+
*/
|
1170
1151
|
getLocation(request, options, callback) {
|
1171
1152
|
return this.locationsClient.getLocation(request, options, callback);
|
1172
1153
|
}
|
1173
1154
|
/**
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1155
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
1156
|
+
*
|
1157
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
1158
|
+
* @param {Object} request
|
1159
|
+
* The request object that will be sent.
|
1160
|
+
* @param {string} request.name
|
1161
|
+
* The resource that owns the locations collection, if applicable.
|
1162
|
+
* @param {string} request.filter
|
1163
|
+
* The standard list filter.
|
1164
|
+
* @param {number} request.pageSize
|
1165
|
+
* The standard list page size.
|
1166
|
+
* @param {string} request.pageToken
|
1167
|
+
* The standard list page token.
|
1168
|
+
* @param {object} [options]
|
1169
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1170
|
+
* @returns {Object}
|
1171
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1172
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1173
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1174
|
+
* so you can stop the iteration when you don't need more results.
|
1175
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1176
|
+
* for more details and examples.
|
1177
|
+
* @example
|
1178
|
+
* ```
|
1179
|
+
* const iterable = client.listLocationsAsync(request);
|
1180
|
+
* for await (const response of iterable) {
|
1181
|
+
* // process response
|
1182
|
+
* }
|
1183
|
+
* ```
|
1184
|
+
*/
|
1204
1185
|
listLocationsAsync(request, options) {
|
1205
1186
|
return this.locationsClient.listLocationsAsync(request, options);
|
1206
1187
|
}
|
@@ -1264,6 +1245,51 @@ class ConversationalSearchServiceClient {
|
|
1264
1245
|
matchEngineFromEngineName(engineName) {
|
1265
1246
|
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
1266
1247
|
}
|
1248
|
+
/**
|
1249
|
+
* Return a fully-qualified identityMappingStore resource name string.
|
1250
|
+
*
|
1251
|
+
* @param {string} project
|
1252
|
+
* @param {string} location
|
1253
|
+
* @param {string} identity_mapping_store
|
1254
|
+
* @returns {string} Resource name string.
|
1255
|
+
*/
|
1256
|
+
identityMappingStorePath(project, location, identityMappingStore) {
|
1257
|
+
return this.pathTemplates.identityMappingStorePathTemplate.render({
|
1258
|
+
project: project,
|
1259
|
+
location: location,
|
1260
|
+
identity_mapping_store: identityMappingStore,
|
1261
|
+
});
|
1262
|
+
}
|
1263
|
+
/**
|
1264
|
+
* Parse the project from IdentityMappingStore resource.
|
1265
|
+
*
|
1266
|
+
* @param {string} identityMappingStoreName
|
1267
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
1268
|
+
* @returns {string} A string representing the project.
|
1269
|
+
*/
|
1270
|
+
matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
|
1271
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
|
1272
|
+
}
|
1273
|
+
/**
|
1274
|
+
* Parse the location from IdentityMappingStore resource.
|
1275
|
+
*
|
1276
|
+
* @param {string} identityMappingStoreName
|
1277
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
1278
|
+
* @returns {string} A string representing the location.
|
1279
|
+
*/
|
1280
|
+
matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
|
1281
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
|
1282
|
+
}
|
1283
|
+
/**
|
1284
|
+
* Parse the identity_mapping_store from IdentityMappingStore resource.
|
1285
|
+
*
|
1286
|
+
* @param {string} identityMappingStoreName
|
1287
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
1288
|
+
* @returns {string} A string representing the identity_mapping_store.
|
1289
|
+
*/
|
1290
|
+
matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
|
1291
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
|
1292
|
+
}
|
1267
1293
|
/**
|
1268
1294
|
* Return a fully-qualified project resource name string.
|
1269
1295
|
*
|
@@ -1285,6 +1311,84 @@ class ConversationalSearchServiceClient {
|
|
1285
1311
|
matchProjectFromProjectName(projectName) {
|
1286
1312
|
return this.pathTemplates.projectPathTemplate.match(projectName).project;
|
1287
1313
|
}
|
1314
|
+
/**
|
1315
|
+
* Return a fully-qualified projectLocationCmekConfig resource name string.
|
1316
|
+
*
|
1317
|
+
* @param {string} project
|
1318
|
+
* @param {string} location
|
1319
|
+
* @returns {string} Resource name string.
|
1320
|
+
*/
|
1321
|
+
projectLocationCmekConfigPath(project, location) {
|
1322
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
|
1323
|
+
project: project,
|
1324
|
+
location: location,
|
1325
|
+
});
|
1326
|
+
}
|
1327
|
+
/**
|
1328
|
+
* Parse the project from ProjectLocationCmekConfig resource.
|
1329
|
+
*
|
1330
|
+
* @param {string} projectLocationCmekConfigName
|
1331
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
1332
|
+
* @returns {string} A string representing the project.
|
1333
|
+
*/
|
1334
|
+
matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
1335
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
|
1336
|
+
}
|
1337
|
+
/**
|
1338
|
+
* Parse the location from ProjectLocationCmekConfig resource.
|
1339
|
+
*
|
1340
|
+
* @param {string} projectLocationCmekConfigName
|
1341
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
1342
|
+
* @returns {string} A string representing the location.
|
1343
|
+
*/
|
1344
|
+
matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
1345
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
|
1346
|
+
}
|
1347
|
+
/**
|
1348
|
+
* Return a fully-qualified projectLocationCmekConfigs resource name string.
|
1349
|
+
*
|
1350
|
+
* @param {string} project
|
1351
|
+
* @param {string} location
|
1352
|
+
* @param {string} cmek_config
|
1353
|
+
* @returns {string} Resource name string.
|
1354
|
+
*/
|
1355
|
+
projectLocationCmekConfigsPath(project, location, cmekConfig) {
|
1356
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
|
1357
|
+
project: project,
|
1358
|
+
location: location,
|
1359
|
+
cmek_config: cmekConfig,
|
1360
|
+
});
|
1361
|
+
}
|
1362
|
+
/**
|
1363
|
+
* Parse the project from ProjectLocationCmekConfigs resource.
|
1364
|
+
*
|
1365
|
+
* @param {string} projectLocationCmekConfigsName
|
1366
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
1367
|
+
* @returns {string} A string representing the project.
|
1368
|
+
*/
|
1369
|
+
matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
1370
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
|
1371
|
+
}
|
1372
|
+
/**
|
1373
|
+
* Parse the location from ProjectLocationCmekConfigs resource.
|
1374
|
+
*
|
1375
|
+
* @param {string} projectLocationCmekConfigsName
|
1376
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
1377
|
+
* @returns {string} A string representing the location.
|
1378
|
+
*/
|
1379
|
+
matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
1380
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
|
1381
|
+
}
|
1382
|
+
/**
|
1383
|
+
* Parse the cmek_config from ProjectLocationCmekConfigs resource.
|
1384
|
+
*
|
1385
|
+
* @param {string} projectLocationCmekConfigsName
|
1386
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
1387
|
+
* @returns {string} A string representing the cmek_config.
|
1388
|
+
*/
|
1389
|
+
matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
1390
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
|
1391
|
+
}
|
1288
1392
|
/**
|
1289
1393
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
1290
1394
|
*
|
@@ -3442,7 +3546,7 @@ class ConversationalSearchServiceClient {
|
|
3442
3546
|
this._log.info('ending gRPC channel');
|
3443
3547
|
this._terminated = true;
|
3444
3548
|
stub.close();
|
3445
|
-
this.locationsClient.close();
|
3549
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3446
3550
|
});
|
3447
3551
|
}
|
3448
3552
|
return Promise.resolve();
|