@google-cloud/discoveryengine 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -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
|
}
|
@@ -212,7 +206,7 @@ class SearchServiceClient {
|
|
212
206
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
213
207
|
// pages). Denote the keys used for pagination and results.
|
214
208
|
this.descriptors.page = {
|
215
|
-
search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results')
|
209
|
+
search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results')
|
216
210
|
};
|
217
211
|
// Put together the default options sent with requests.
|
218
212
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -241,11 +235,10 @@ class SearchServiceClient {
|
|
241
235
|
}
|
242
236
|
// Put together the "service stub" for
|
243
237
|
// google.cloud.discoveryengine.v1alpha.SearchService.
|
244
|
-
this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
.SearchService, this._opts, this._providedCustomServicePath);
|
238
|
+
this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
239
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SearchService') :
|
240
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
241
|
+
this._protos.google.cloud.discoveryengine.v1alpha.SearchService, this._opts, this._providedCustomServicePath);
|
249
242
|
// Iterate over each of the methods that the service provides
|
250
243
|
// and create an API call method for each.
|
251
244
|
const searchServiceStubMethods = ['search'];
|
@@ -259,7 +252,8 @@ class SearchServiceClient {
|
|
259
252
|
}, (err) => () => {
|
260
253
|
throw err;
|
261
254
|
});
|
262
|
-
const descriptor = this.descriptors.page[methodName] ||
|
255
|
+
const descriptor = this.descriptors.page[methodName] ||
|
256
|
+
undefined;
|
263
257
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
264
258
|
this.innerApiCalls[methodName] = apiCall;
|
265
259
|
}
|
@@ -271,8 +265,7 @@ class SearchServiceClient {
|
|
271
265
|
* @returns {string} The DNS address for this service.
|
272
266
|
*/
|
273
267
|
static get servicePath() {
|
274
|
-
if (typeof process === 'object' &&
|
275
|
-
typeof process.emitWarning === 'function') {
|
268
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
276
269
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
277
270
|
}
|
278
271
|
return 'discoveryengine.googleapis.com';
|
@@ -283,8 +276,7 @@ class SearchServiceClient {
|
|
283
276
|
* @returns {string} The DNS address for this service.
|
284
277
|
*/
|
285
278
|
static get apiEndpoint() {
|
286
|
-
if (typeof process === 'object' &&
|
287
|
-
typeof process.emitWarning === 'function') {
|
279
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
288
280
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
289
281
|
}
|
290
282
|
return 'discoveryengine.googleapis.com';
|
@@ -312,7 +304,9 @@ class SearchServiceClient {
|
|
312
304
|
* @returns {string[]} List of default scopes.
|
313
305
|
*/
|
314
306
|
static get scopes() {
|
315
|
-
return [
|
307
|
+
return [
|
308
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
309
|
+
];
|
316
310
|
}
|
317
311
|
/**
|
318
312
|
* Return the project ID used by this class.
|
@@ -338,13 +332,10 @@ class SearchServiceClient {
|
|
338
332
|
options = options || {};
|
339
333
|
options.otherArgs = options.otherArgs || {};
|
340
334
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
341
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
342
|
-
|
343
|
-
serving_config: request.servingConfig ?? '',
|
344
|
-
});
|
345
|
-
this.initialize().catch(err => {
|
346
|
-
throw err;
|
335
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
336
|
+
'serving_config': request.servingConfig ?? '',
|
347
337
|
});
|
338
|
+
this.initialize().catch(err => { throw err; });
|
348
339
|
const wrappedCallback = callback
|
349
340
|
? (error, values, nextPageRequest, rawResponse) => {
|
350
341
|
this._log.info('search values %j', values);
|
@@ -643,15 +634,12 @@ class SearchServiceClient {
|
|
643
634
|
options = options || {};
|
644
635
|
options.otherArgs = options.otherArgs || {};
|
645
636
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
646
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
647
|
-
|
648
|
-
|
649
|
-
});
|
637
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
638
|
+
'serving_config': request.servingConfig ?? '',
|
639
|
+
});
|
650
640
|
const defaultCallSettings = this._defaults['search'];
|
651
641
|
const callSettings = defaultCallSettings.merge(options);
|
652
|
-
this.initialize().catch(err => {
|
653
|
-
throw err;
|
654
|
-
});
|
642
|
+
this.initialize().catch(err => { throw err; });
|
655
643
|
this._log.info('search stream %j', request);
|
656
644
|
return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
|
657
645
|
}
|
@@ -942,70 +930,67 @@ class SearchServiceClient {
|
|
942
930
|
options = options || {};
|
943
931
|
options.otherArgs = options.otherArgs || {};
|
944
932
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
945
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
946
|
-
|
947
|
-
|
948
|
-
});
|
933
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
934
|
+
'serving_config': request.servingConfig ?? '',
|
935
|
+
});
|
949
936
|
const defaultCallSettings = this._defaults['search'];
|
950
937
|
const callSettings = defaultCallSettings.merge(options);
|
951
|
-
this.initialize().catch(err => {
|
952
|
-
throw err;
|
953
|
-
});
|
938
|
+
this.initialize().catch(err => { throw err; });
|
954
939
|
this._log.info('search iterate %j', request);
|
955
940
|
return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
|
956
941
|
}
|
957
942
|
/**
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
943
|
+
* Gets information about a location.
|
944
|
+
*
|
945
|
+
* @param {Object} request
|
946
|
+
* The request object that will be sent.
|
947
|
+
* @param {string} request.name
|
948
|
+
* Resource name for the location.
|
949
|
+
* @param {object} [options]
|
950
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
951
|
+
* @returns {Promise} - The promise which resolves to an array.
|
952
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
953
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
954
|
+
* for more details and examples.
|
955
|
+
* @example
|
956
|
+
* ```
|
957
|
+
* const [response] = await client.getLocation(request);
|
958
|
+
* ```
|
959
|
+
*/
|
975
960
|
getLocation(request, options, callback) {
|
976
961
|
return this.locationsClient.getLocation(request, options, callback);
|
977
962
|
}
|
978
963
|
/**
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
964
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
965
|
+
*
|
966
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
967
|
+
* @param {Object} request
|
968
|
+
* The request object that will be sent.
|
969
|
+
* @param {string} request.name
|
970
|
+
* The resource that owns the locations collection, if applicable.
|
971
|
+
* @param {string} request.filter
|
972
|
+
* The standard list filter.
|
973
|
+
* @param {number} request.pageSize
|
974
|
+
* The standard list page size.
|
975
|
+
* @param {string} request.pageToken
|
976
|
+
* The standard list page token.
|
977
|
+
* @param {object} [options]
|
978
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
979
|
+
* @returns {Object}
|
980
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
981
|
+
* When you iterate the returned iterable, each element will be an object representing
|
982
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
983
|
+
* so you can stop the iteration when you don't need more results.
|
984
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
985
|
+
* for more details and examples.
|
986
|
+
* @example
|
987
|
+
* ```
|
988
|
+
* const iterable = client.listLocationsAsync(request);
|
989
|
+
* for await (const response of iterable) {
|
990
|
+
* // process response
|
991
|
+
* }
|
992
|
+
* ```
|
993
|
+
*/
|
1009
994
|
listLocationsAsync(request, options) {
|
1010
995
|
return this.locationsClient.listLocationsAsync(request, options);
|
1011
996
|
}
|
@@ -1033,8 +1018,7 @@ class SearchServiceClient {
|
|
1033
1018
|
* @returns {string} A string representing the project.
|
1034
1019
|
*/
|
1035
1020
|
matchProjectFromAclConfigName(aclConfigName) {
|
1036
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1037
|
-
.project;
|
1021
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1038
1022
|
}
|
1039
1023
|
/**
|
1040
1024
|
* Parse the location from AclConfig resource.
|
@@ -1044,8 +1028,7 @@ class SearchServiceClient {
|
|
1044
1028
|
* @returns {string} A string representing the location.
|
1045
1029
|
*/
|
1046
1030
|
matchLocationFromAclConfigName(aclConfigName) {
|
1047
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1048
|
-
.location;
|
1031
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1049
1032
|
}
|
1050
1033
|
/**
|
1051
1034
|
* Return a fully-qualified engine resource name string.
|
@@ -1127,8 +1110,7 @@ class SearchServiceClient {
|
|
1127
1110
|
* @returns {string} A string representing the project.
|
1128
1111
|
*/
|
1129
1112
|
matchProjectFromEvaluationName(evaluationName) {
|
1130
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1131
|
-
.project;
|
1113
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1132
1114
|
}
|
1133
1115
|
/**
|
1134
1116
|
* Parse the location from Evaluation resource.
|
@@ -1138,8 +1120,7 @@ class SearchServiceClient {
|
|
1138
1120
|
* @returns {string} A string representing the location.
|
1139
1121
|
*/
|
1140
1122
|
matchLocationFromEvaluationName(evaluationName) {
|
1141
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1142
|
-
.location;
|
1123
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1143
1124
|
}
|
1144
1125
|
/**
|
1145
1126
|
* Parse the evaluation from Evaluation resource.
|
@@ -1149,8 +1130,7 @@ class SearchServiceClient {
|
|
1149
1130
|
* @returns {string} A string representing the evaluation.
|
1150
1131
|
*/
|
1151
1132
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1152
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1153
|
-
.evaluation;
|
1133
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1154
1134
|
}
|
1155
1135
|
/**
|
1156
1136
|
* Return a fully-qualified project resource name string.
|
@@ -3343,8 +3323,7 @@ class SearchServiceClient {
|
|
3343
3323
|
* @returns {string} A string representing the project.
|
3344
3324
|
*/
|
3345
3325
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3346
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3347
|
-
.project;
|
3326
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3348
3327
|
}
|
3349
3328
|
/**
|
3350
3329
|
* Parse the location from SampleQuery resource.
|
@@ -3354,8 +3333,7 @@ class SearchServiceClient {
|
|
3354
3333
|
* @returns {string} A string representing the location.
|
3355
3334
|
*/
|
3356
3335
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3357
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3358
|
-
.location;
|
3336
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3359
3337
|
}
|
3360
3338
|
/**
|
3361
3339
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3365,8 +3343,7 @@ class SearchServiceClient {
|
|
3365
3343
|
* @returns {string} A string representing the sample_query_set.
|
3366
3344
|
*/
|
3367
3345
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3368
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3369
|
-
.sample_query_set;
|
3346
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3370
3347
|
}
|
3371
3348
|
/**
|
3372
3349
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3376,8 +3353,7 @@ class SearchServiceClient {
|
|
3376
3353
|
* @returns {string} A string representing the sample_query.
|
3377
3354
|
*/
|
3378
3355
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3379
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3380
|
-
.sample_query;
|
3356
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3381
3357
|
}
|
3382
3358
|
/**
|
3383
3359
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3436,7 +3412,7 @@ class SearchServiceClient {
|
|
3436
3412
|
this._log.info('ending gRPC channel');
|
3437
3413
|
this._terminated = true;
|
3438
3414
|
stub.close();
|
3439
|
-
this.locationsClient.close();
|
3415
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3440
3416
|
});
|
3441
3417
|
}
|
3442
3418
|
return Promise.resolve();
|
@@ -137,7 +137,7 @@ export declare class SearchTuningServiceClient {
|
|
137
137
|
*/
|
138
138
|
listCustomModels(request?: protos.google.cloud.discoveryengine.v1alpha.IListCustomModelsRequest, options?: CallOptions): Promise<[
|
139
139
|
protos.google.cloud.discoveryengine.v1alpha.IListCustomModelsResponse,
|
140
|
-
|
140
|
+
protos.google.cloud.discoveryengine.v1alpha.IListCustomModelsRequest | undefined,
|
141
141
|
{} | undefined
|
142
142
|
]>;
|
143
143
|
listCustomModels(request: protos.google.cloud.discoveryengine.v1alpha.IListCustomModelsRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IListCustomModelsResponse, protos.google.cloud.discoveryengine.v1alpha.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.v1alpha.TrainCustomModelResponse, protos.google.cloud.discoveryengine.v1alpha.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
|