@google-cloud/discoveryengine 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/protos/protos.d.ts +31 -316
- package/build/protos/protos.js +146 -593
- package/build/protos/protos.json +25 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +1 -21
- package/build/src/v1/completion_service_client.d.ts +76 -76
- package/build/src/v1/completion_service_client.js +125 -262
- package/build/src/v1/control_service_client.d.ts +81 -81
- package/build/src/v1/control_service_client.js +96 -132
- package/build/src/v1/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1/conversational_search_service_client.js +138 -226
- package/build/src/v1/data_store_service_client.d.ts +122 -122
- package/build/src/v1/data_store_service_client.js +134 -280
- package/build/src/v1/document_service_client.d.ts +120 -120
- package/build/src/v1/document_service_client.js +143 -300
- package/build/src/v1/engine_service_client.d.ts +103 -103
- package/build/src/v1/engine_service_client.js +134 -279
- package/build/src/v1/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1/grounded_generation_service_client.js +79 -100
- package/build/src/v1/project_service_client.d.ts +76 -76
- package/build/src/v1/project_service_client.js +108 -222
- package/build/src/v1/rank_service_client.d.ts +47 -47
- package/build/src/v1/rank_service_client.js +72 -85
- package/build/src/v1/recommendation_service_client.d.ts +47 -47
- package/build/src/v1/recommendation_service_client.js +70 -82
- package/build/src/v1/schema_service_client.d.ts +111 -111
- package/build/src/v1/schema_service_client.js +131 -273
- package/build/src/v1/search_service_client.d.ts +545 -545
- package/build/src/v1/search_service_client.js +90 -113
- package/build/src/v1/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1/search_tuning_service_client.js +113 -235
- package/build/src/v1/serving_config_service_client.d.ts +48 -48
- package/build/src/v1/serving_config_service_client.js +69 -80
- package/build/src/v1/site_search_engine_service_client.d.ts +148 -148
- package/build/src/v1/site_search_engine_service_client.js +179 -378
- package/build/src/v1/user_event_service_client.d.ts +77 -77
- package/build/src/v1/user_event_service_client.js +121 -253
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +1 -1
@@ -97,26 +97,17 @@ class SearchServiceClient {
|
|
97
97
|
constructor(opts, gaxInstance) {
|
98
98
|
// Ensure that options include all the required fields.
|
99
99
|
const staticMembers = this.constructor;
|
100
|
-
if (opts?.universe_domain &&
|
101
|
-
opts?.universeDomain &&
|
102
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
103
101
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
104
102
|
}
|
105
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
106
|
-
|
107
|
-
: undefined;
|
108
|
-
this._universeDomain =
|
109
|
-
opts?.universeDomain ??
|
110
|
-
opts?.universe_domain ??
|
111
|
-
universeDomainEnvVar ??
|
112
|
-
'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';
|
113
105
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
114
106
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
115
107
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
116
108
|
const port = opts?.port || staticMembers.port;
|
117
109
|
const clientConfig = opts?.clientConfig ?? {};
|
118
|
-
const fallback = opts?.fallback ??
|
119
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
110
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
120
111
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
121
112
|
// Request numeric enum values if REST transport is used.
|
122
113
|
opts.numericEnums = true;
|
@@ -146,7 +137,10 @@ class SearchServiceClient {
|
|
146
137
|
}
|
147
138
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
148
139
|
// Determine the client header string.
|
149
|
-
const clientHeader = [
|
140
|
+
const clientHeader = [
|
141
|
+
`gax/${this._gaxModule.version}`,
|
142
|
+
`gapic/${version}`,
|
143
|
+
];
|
150
144
|
if (typeof process === 'object' && 'versions' in process) {
|
151
145
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
152
146
|
}
|
@@ -211,7 +205,7 @@ class SearchServiceClient {
|
|
211
205
|
// pages). Denote the keys used for pagination and results.
|
212
206
|
this.descriptors.page = {
|
213
207
|
search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
|
214
|
-
searchLite: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results')
|
208
|
+
searchLite: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results')
|
215
209
|
};
|
216
210
|
// Put together the default options sent with requests.
|
217
211
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -240,10 +234,10 @@ class SearchServiceClient {
|
|
240
234
|
}
|
241
235
|
// Put together the "service stub" for
|
242
236
|
// google.cloud.discoveryengine.v1.SearchService.
|
243
|
-
this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
244
|
-
|
245
|
-
|
246
|
-
|
237
|
+
this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
238
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.SearchService') :
|
239
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
240
|
+
this._protos.google.cloud.discoveryengine.v1.SearchService, this._opts, this._providedCustomServicePath);
|
247
241
|
// Iterate over each of the methods that the service provides
|
248
242
|
// and create an API call method for each.
|
249
243
|
const searchServiceStubMethods = ['search', 'searchLite'];
|
@@ -257,7 +251,8 @@ class SearchServiceClient {
|
|
257
251
|
}, (err) => () => {
|
258
252
|
throw err;
|
259
253
|
});
|
260
|
-
const descriptor = this.descriptors.page[methodName] ||
|
254
|
+
const descriptor = this.descriptors.page[methodName] ||
|
255
|
+
undefined;
|
261
256
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
262
257
|
this.innerApiCalls[methodName] = apiCall;
|
263
258
|
}
|
@@ -269,8 +264,7 @@ class SearchServiceClient {
|
|
269
264
|
* @returns {string} The DNS address for this service.
|
270
265
|
*/
|
271
266
|
static get servicePath() {
|
272
|
-
if (typeof process === 'object' &&
|
273
|
-
typeof process.emitWarning === 'function') {
|
267
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
274
268
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
275
269
|
}
|
276
270
|
return 'discoveryengine.googleapis.com';
|
@@ -281,8 +275,7 @@ class SearchServiceClient {
|
|
281
275
|
* @returns {string} The DNS address for this service.
|
282
276
|
*/
|
283
277
|
static get apiEndpoint() {
|
284
|
-
if (typeof process === 'object' &&
|
285
|
-
typeof process.emitWarning === 'function') {
|
278
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
286
279
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
287
280
|
}
|
288
281
|
return 'discoveryengine.googleapis.com';
|
@@ -310,7 +303,9 @@ class SearchServiceClient {
|
|
310
303
|
* @returns {string[]} List of default scopes.
|
311
304
|
*/
|
312
305
|
static get scopes() {
|
313
|
-
return [
|
306
|
+
return [
|
307
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
308
|
+
];
|
314
309
|
}
|
315
310
|
/**
|
316
311
|
* Return the project ID used by this class.
|
@@ -336,13 +331,10 @@ class SearchServiceClient {
|
|
336
331
|
options = options || {};
|
337
332
|
options.otherArgs = options.otherArgs || {};
|
338
333
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
339
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
340
|
-
|
341
|
-
serving_config: request.servingConfig ?? '',
|
342
|
-
});
|
343
|
-
this.initialize().catch(err => {
|
344
|
-
throw err;
|
334
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
335
|
+
'serving_config': request.servingConfig ?? '',
|
345
336
|
});
|
337
|
+
this.initialize().catch(err => { throw err; });
|
346
338
|
const wrappedCallback = callback
|
347
339
|
? (error, values, nextPageRequest, rawResponse) => {
|
348
340
|
this._log.info('search values %j', values);
|
@@ -604,15 +596,12 @@ class SearchServiceClient {
|
|
604
596
|
options = options || {};
|
605
597
|
options.otherArgs = options.otherArgs || {};
|
606
598
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
607
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
608
|
-
|
609
|
-
|
610
|
-
});
|
599
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
600
|
+
'serving_config': request.servingConfig ?? '',
|
601
|
+
});
|
611
602
|
const defaultCallSettings = this._defaults['search'];
|
612
603
|
const callSettings = defaultCallSettings.merge(options);
|
613
|
-
this.initialize().catch(err => {
|
614
|
-
throw err;
|
615
|
-
});
|
604
|
+
this.initialize().catch(err => { throw err; });
|
616
605
|
this._log.info('search stream %j', request);
|
617
606
|
return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
|
618
607
|
}
|
@@ -866,15 +855,12 @@ class SearchServiceClient {
|
|
866
855
|
options = options || {};
|
867
856
|
options.otherArgs = options.otherArgs || {};
|
868
857
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
869
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
870
|
-
|
871
|
-
|
872
|
-
});
|
858
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
859
|
+
'serving_config': request.servingConfig ?? '',
|
860
|
+
});
|
873
861
|
const defaultCallSettings = this._defaults['search'];
|
874
862
|
const callSettings = defaultCallSettings.merge(options);
|
875
|
-
this.initialize().catch(err => {
|
876
|
-
throw err;
|
877
|
-
});
|
863
|
+
this.initialize().catch(err => { throw err; });
|
878
864
|
this._log.info('search iterate %j', request);
|
879
865
|
return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
|
880
866
|
}
|
@@ -891,13 +877,10 @@ class SearchServiceClient {
|
|
891
877
|
options = options || {};
|
892
878
|
options.otherArgs = options.otherArgs || {};
|
893
879
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
894
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
895
|
-
|
896
|
-
serving_config: request.servingConfig ?? '',
|
897
|
-
});
|
898
|
-
this.initialize().catch(err => {
|
899
|
-
throw err;
|
880
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
881
|
+
'serving_config': request.servingConfig ?? '',
|
900
882
|
});
|
883
|
+
this.initialize().catch(err => { throw err; });
|
901
884
|
const wrappedCallback = callback
|
902
885
|
? (error, values, nextPageRequest, rawResponse) => {
|
903
886
|
this._log.info('searchLite values %j', values);
|
@@ -1159,15 +1142,12 @@ class SearchServiceClient {
|
|
1159
1142
|
options = options || {};
|
1160
1143
|
options.otherArgs = options.otherArgs || {};
|
1161
1144
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1162
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1163
|
-
|
1164
|
-
|
1165
|
-
});
|
1145
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1146
|
+
'serving_config': request.servingConfig ?? '',
|
1147
|
+
});
|
1166
1148
|
const defaultCallSettings = this._defaults['searchLite'];
|
1167
1149
|
const callSettings = defaultCallSettings.merge(options);
|
1168
|
-
this.initialize().catch(err => {
|
1169
|
-
throw err;
|
1170
|
-
});
|
1150
|
+
this.initialize().catch(err => { throw err; });
|
1171
1151
|
this._log.info('searchLite stream %j', request);
|
1172
1152
|
return this.descriptors.page.searchLite.createStream(this.innerApiCalls.searchLite, request, callSettings);
|
1173
1153
|
}
|
@@ -1421,70 +1401,67 @@ class SearchServiceClient {
|
|
1421
1401
|
options = options || {};
|
1422
1402
|
options.otherArgs = options.otherArgs || {};
|
1423
1403
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
1424
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
1425
|
-
|
1426
|
-
|
1427
|
-
});
|
1404
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
1405
|
+
'serving_config': request.servingConfig ?? '',
|
1406
|
+
});
|
1428
1407
|
const defaultCallSettings = this._defaults['searchLite'];
|
1429
1408
|
const callSettings = defaultCallSettings.merge(options);
|
1430
|
-
this.initialize().catch(err => {
|
1431
|
-
throw err;
|
1432
|
-
});
|
1409
|
+
this.initialize().catch(err => { throw err; });
|
1433
1410
|
this._log.info('searchLite iterate %j', request);
|
1434
1411
|
return this.descriptors.page.searchLite.asyncIterate(this.innerApiCalls['searchLite'], request, callSettings);
|
1435
1412
|
}
|
1436
1413
|
/**
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1414
|
+
* Gets information about a location.
|
1415
|
+
*
|
1416
|
+
* @param {Object} request
|
1417
|
+
* The request object that will be sent.
|
1418
|
+
* @param {string} request.name
|
1419
|
+
* Resource name for the location.
|
1420
|
+
* @param {object} [options]
|
1421
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
1422
|
+
* @returns {Promise} - The promise which resolves to an array.
|
1423
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
1424
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
1425
|
+
* for more details and examples.
|
1426
|
+
* @example
|
1427
|
+
* ```
|
1428
|
+
* const [response] = await client.getLocation(request);
|
1429
|
+
* ```
|
1430
|
+
*/
|
1454
1431
|
getLocation(request, options, callback) {
|
1455
1432
|
return this.locationsClient.getLocation(request, options, callback);
|
1456
1433
|
}
|
1457
1434
|
/**
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1435
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
1436
|
+
*
|
1437
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
1438
|
+
* @param {Object} request
|
1439
|
+
* The request object that will be sent.
|
1440
|
+
* @param {string} request.name
|
1441
|
+
* The resource that owns the locations collection, if applicable.
|
1442
|
+
* @param {string} request.filter
|
1443
|
+
* The standard list filter.
|
1444
|
+
* @param {number} request.pageSize
|
1445
|
+
* The standard list page size.
|
1446
|
+
* @param {string} request.pageToken
|
1447
|
+
* The standard list page token.
|
1448
|
+
* @param {object} [options]
|
1449
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1450
|
+
* @returns {Object}
|
1451
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1452
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1453
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1454
|
+
* so you can stop the iteration when you don't need more results.
|
1455
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1456
|
+
* for more details and examples.
|
1457
|
+
* @example
|
1458
|
+
* ```
|
1459
|
+
* const iterable = client.listLocationsAsync(request);
|
1460
|
+
* for await (const response of iterable) {
|
1461
|
+
* // process response
|
1462
|
+
* }
|
1463
|
+
* ```
|
1464
|
+
*/
|
1488
1465
|
listLocationsAsync(request, options) {
|
1489
1466
|
return this.locationsClient.listLocationsAsync(request, options);
|
1490
1467
|
}
|
@@ -3852,7 +3829,7 @@ class SearchServiceClient {
|
|
3852
3829
|
this._log.info('ending gRPC channel');
|
3853
3830
|
this._terminated = true;
|
3854
3831
|
stub.close();
|
3855
|
-
this.locationsClient.close();
|
3832
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3856
3833
|
});
|
3857
3834
|
}
|
3858
3835
|
return Promise.resolve();
|
@@ -137,7 +137,7 @@ export declare class SearchTuningServiceClient {
|
|
137
137
|
*/
|
138
138
|
listCustomModels(request?: protos.google.cloud.discoveryengine.v1.IListCustomModelsRequest, options?: CallOptions): Promise<[
|
139
139
|
protos.google.cloud.discoveryengine.v1.IListCustomModelsResponse,
|
140
|
-
|
140
|
+
protos.google.cloud.discoveryengine.v1.IListCustomModelsRequest | undefined,
|
141
141
|
{} | undefined
|
142
142
|
]>;
|
143
143
|
listCustomModels(request: protos.google.cloud.discoveryengine.v1.IListCustomModelsRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1.IListCustomModelsResponse, protos.google.cloud.discoveryengine.v1.IListCustomModelsRequest | null | undefined, {} | null | undefined>): void;
|
@@ -193,86 +193,86 @@ export declare class SearchTuningServiceClient {
|
|
193
193
|
*/
|
194
194
|
checkTrainCustomModelProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1.TrainCustomModelResponse, protos.google.cloud.discoveryengine.v1.TrainCustomModelMetadata>>;
|
195
195
|
/**
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
196
|
+
* Gets information about a location.
|
197
|
+
*
|
198
|
+
* @param {Object} request
|
199
|
+
* The request object that will be sent.
|
200
|
+
* @param {string} request.name
|
201
|
+
* Resource name for the location.
|
202
|
+
* @param {object} [options]
|
203
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
204
|
+
* @returns {Promise} - The promise which resolves to an array.
|
205
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
206
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
207
|
+
* for more details and examples.
|
208
|
+
* @example
|
209
|
+
* ```
|
210
|
+
* const [response] = await client.getLocation(request);
|
211
|
+
* ```
|
212
|
+
*/
|
213
213
|
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
214
214
|
/**
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
215
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
216
|
+
*
|
217
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
218
|
+
* @param {Object} request
|
219
|
+
* The request object that will be sent.
|
220
|
+
* @param {string} request.name
|
221
|
+
* The resource that owns the locations collection, if applicable.
|
222
|
+
* @param {string} request.filter
|
223
|
+
* The standard list filter.
|
224
|
+
* @param {number} request.pageSize
|
225
|
+
* The standard list page size.
|
226
|
+
* @param {string} request.pageToken
|
227
|
+
* The standard list page token.
|
228
|
+
* @param {object} [options]
|
229
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
230
|
+
* @returns {Object}
|
231
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
232
|
+
* When you iterate the returned iterable, each element will be an object representing
|
233
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
234
|
+
* so you can stop the iteration when you don't need more results.
|
235
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
236
|
+
* for more details and examples.
|
237
|
+
* @example
|
238
|
+
* ```
|
239
|
+
* const iterable = client.listLocationsAsync(request);
|
240
|
+
* for await (const response of iterable) {
|
241
|
+
* // process response
|
242
|
+
* }
|
243
|
+
* ```
|
244
|
+
*/
|
245
245
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
246
246
|
/**
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
247
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
248
|
+
* method to poll the operation result at intervals as recommended by the API
|
249
|
+
* service.
|
250
|
+
*
|
251
|
+
* @param {Object} request - The request object that will be sent.
|
252
|
+
* @param {string} request.name - The name of the operation resource.
|
253
|
+
* @param {Object=} options
|
254
|
+
* Optional parameters. You can override the default settings for this call,
|
255
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
256
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
257
|
+
* for the details.
|
258
|
+
* @param {function(?Error, ?Object)=} callback
|
259
|
+
* The function which will be called with the result of the API call.
|
260
|
+
*
|
261
|
+
* The second parameter to the callback is an object representing
|
262
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
263
|
+
* @return {Promise} - The promise which resolves to an array.
|
264
|
+
* The first element of the array is an object representing
|
265
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
266
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
267
|
+
*
|
268
|
+
* @example
|
269
|
+
* ```
|
270
|
+
* const client = longrunning.operationsClient();
|
271
|
+
* const name = '';
|
272
|
+
* const [response] = await client.getOperation({name});
|
273
|
+
* // doThingsWith(response)
|
274
|
+
* ```
|
275
|
+
*/
|
276
276
|
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
|
277
277
|
/**
|
278
278
|
* Lists operations that match the specified filter in the request. If the
|