@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
|
@@ -98,26 +98,17 @@ class SearchTuningServiceClient {
|
|
|
98
98
|
constructor(opts, gaxInstance) {
|
|
99
99
|
// Ensure that options include all the required fields.
|
|
100
100
|
const staticMembers = this.constructor;
|
|
101
|
-
if (opts?.universe_domain &&
|
|
102
|
-
opts?.universeDomain &&
|
|
103
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
|
104
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
105
103
|
}
|
|
106
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
107
|
-
|
|
108
|
-
: undefined;
|
|
109
|
-
this._universeDomain =
|
|
110
|
-
opts?.universeDomain ??
|
|
111
|
-
opts?.universe_domain ??
|
|
112
|
-
universeDomainEnvVar ??
|
|
113
|
-
'googleapis.com';
|
|
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';
|
|
114
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
|
115
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
116
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
117
109
|
const port = opts?.port || staticMembers.port;
|
|
118
110
|
const clientConfig = opts?.clientConfig ?? {};
|
|
119
|
-
const fallback = opts?.fallback ??
|
|
120
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
121
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
122
113
|
// Request numeric enum values if REST transport is used.
|
|
123
114
|
opts.numericEnums = true;
|
|
@@ -147,7 +138,10 @@ class SearchTuningServiceClient {
|
|
|
147
138
|
}
|
|
148
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
149
140
|
// Determine the client header string.
|
|
150
|
-
const clientHeader = [
|
|
141
|
+
const clientHeader = [
|
|
142
|
+
`gax/${this._gaxModule.version}`,
|
|
143
|
+
`gapic/${version}`,
|
|
144
|
+
];
|
|
151
145
|
if (typeof process === 'object' && 'versions' in process) {
|
|
152
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
153
147
|
}
|
|
@@ -211,125 +205,20 @@ class SearchTuningServiceClient {
|
|
|
211
205
|
// rather than holding a request open.
|
|
212
206
|
const lroOptions = {
|
|
213
207
|
auth: this.auth,
|
|
214
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
|
208
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
|
215
209
|
};
|
|
216
210
|
if (opts.fallback) {
|
|
217
211
|
lroOptions.protoJson = protoFilesRoot;
|
|
218
|
-
lroOptions.httpRules = [
|
|
219
|
-
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
body: '*',
|
|
223
|
-
additional_bindings: [
|
|
224
|
-
{
|
|
225
|
-
post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
|
|
226
|
-
body: '*',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
|
230
|
-
body: '*',
|
|
231
|
-
},
|
|
232
|
-
],
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
|
236
|
-
get: '/v1/{name=projects/*/operations/*}',
|
|
237
|
-
additional_bindings: [
|
|
238
|
-
{
|
|
239
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
|
|
276
|
-
},
|
|
277
|
-
{ get: '/v1/{name=projects/*/locations/*/operations/*}' },
|
|
278
|
-
{ get: '/v1/{name=projects/*/operations/*}' },
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
|
283
|
-
get: '/v1/{name=projects/*}/operations',
|
|
284
|
-
additional_bindings: [
|
|
285
|
-
{
|
|
286
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
|
308
|
-
},
|
|
309
|
-
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
|
310
|
-
{
|
|
311
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
|
315
|
-
},
|
|
316
|
-
{ get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
|
|
317
|
-
{
|
|
318
|
-
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
|
|
319
|
-
},
|
|
320
|
-
{ get: '/v1/{name=projects/*/locations/*}/operations' },
|
|
321
|
-
{ get: '/v1/{name=projects/*}/operations' },
|
|
322
|
-
],
|
|
323
|
-
},
|
|
324
|
-
];
|
|
212
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
|
213
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/operations/*}', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/operations/*}', }, { get: '/v1/{name=projects/*/operations/*}', }],
|
|
214
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*}/operations', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*}/operations', }, { get: '/v1/{name=projects/*}/operations', }],
|
|
215
|
+
}];
|
|
325
216
|
}
|
|
326
|
-
this.operationsClient = this._gaxModule
|
|
327
|
-
.lro(lroOptions)
|
|
328
|
-
.operationsClient(opts);
|
|
217
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
|
329
218
|
const trainCustomModelResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.TrainCustomModelResponse');
|
|
330
219
|
const trainCustomModelMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.TrainCustomModelMetadata');
|
|
331
220
|
this.descriptors.longrunning = {
|
|
332
|
-
trainCustomModel: new this._gaxModule.LongrunningDescriptor(this.operationsClient, trainCustomModelResponse.decode.bind(trainCustomModelResponse), trainCustomModelMetadata.decode.bind(trainCustomModelMetadata))
|
|
221
|
+
trainCustomModel: new this._gaxModule.LongrunningDescriptor(this.operationsClient, trainCustomModelResponse.decode.bind(trainCustomModelResponse), trainCustomModelMetadata.decode.bind(trainCustomModelMetadata))
|
|
333
222
|
};
|
|
334
223
|
// Put together the default options sent with requests.
|
|
335
224
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.SearchTuningService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -358,17 +247,13 @@ class SearchTuningServiceClient {
|
|
|
358
247
|
}
|
|
359
248
|
// Put together the "service stub" for
|
|
360
249
|
// google.cloud.discoveryengine.v1.SearchTuningService.
|
|
361
|
-
this.searchTuningServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
.SearchTuningService, this._opts, this._providedCustomServicePath);
|
|
250
|
+
this.searchTuningServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
|
251
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.SearchTuningService') :
|
|
252
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
253
|
+
this._protos.google.cloud.discoveryengine.v1.SearchTuningService, this._opts, this._providedCustomServicePath);
|
|
366
254
|
// Iterate over each of the methods that the service provides
|
|
367
255
|
// and create an API call method for each.
|
|
368
|
-
const searchTuningServiceStubMethods = [
|
|
369
|
-
'trainCustomModel',
|
|
370
|
-
'listCustomModels',
|
|
371
|
-
];
|
|
256
|
+
const searchTuningServiceStubMethods = ['trainCustomModel', 'listCustomModels'];
|
|
372
257
|
for (const methodName of searchTuningServiceStubMethods) {
|
|
373
258
|
const callPromise = this.searchTuningServiceStub.then(stub => (...args) => {
|
|
374
259
|
if (this._terminated) {
|
|
@@ -379,7 +264,8 @@ class SearchTuningServiceClient {
|
|
|
379
264
|
}, (err) => () => {
|
|
380
265
|
throw err;
|
|
381
266
|
});
|
|
382
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
|
267
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
|
268
|
+
undefined;
|
|
383
269
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
|
384
270
|
this.innerApiCalls[methodName] = apiCall;
|
|
385
271
|
}
|
|
@@ -391,8 +277,7 @@ class SearchTuningServiceClient {
|
|
|
391
277
|
* @returns {string} The DNS address for this service.
|
|
392
278
|
*/
|
|
393
279
|
static get servicePath() {
|
|
394
|
-
if (typeof process === 'object' &&
|
|
395
|
-
typeof process.emitWarning === 'function') {
|
|
280
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
|
396
281
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
397
282
|
}
|
|
398
283
|
return 'discoveryengine.googleapis.com';
|
|
@@ -403,8 +288,7 @@ class SearchTuningServiceClient {
|
|
|
403
288
|
* @returns {string} The DNS address for this service.
|
|
404
289
|
*/
|
|
405
290
|
static get apiEndpoint() {
|
|
406
|
-
if (typeof process === 'object' &&
|
|
407
|
-
typeof process.emitWarning === 'function') {
|
|
291
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
|
408
292
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
409
293
|
}
|
|
410
294
|
return 'discoveryengine.googleapis.com';
|
|
@@ -432,7 +316,9 @@ class SearchTuningServiceClient {
|
|
|
432
316
|
* @returns {string[]} List of default scopes.
|
|
433
317
|
*/
|
|
434
318
|
static get scopes() {
|
|
435
|
-
return [
|
|
319
|
+
return [
|
|
320
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
|
321
|
+
];
|
|
436
322
|
}
|
|
437
323
|
/**
|
|
438
324
|
* Return the project ID used by this class.
|
|
@@ -458,13 +344,10 @@ class SearchTuningServiceClient {
|
|
|
458
344
|
options = options || {};
|
|
459
345
|
options.otherArgs = options.otherArgs || {};
|
|
460
346
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
461
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
462
|
-
|
|
463
|
-
data_store: request.dataStore ?? '',
|
|
464
|
-
});
|
|
465
|
-
this.initialize().catch(err => {
|
|
466
|
-
throw err;
|
|
347
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
348
|
+
'data_store': request.dataStore ?? '',
|
|
467
349
|
});
|
|
350
|
+
this.initialize().catch(err => { throw err; });
|
|
468
351
|
this._log.info('listCustomModels request %j', request);
|
|
469
352
|
const wrappedCallback = callback
|
|
470
353
|
? (error, response, options, rawResponse) => {
|
|
@@ -472,8 +355,7 @@ class SearchTuningServiceClient {
|
|
|
472
355
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
473
356
|
}
|
|
474
357
|
: undefined;
|
|
475
|
-
return this.innerApiCalls
|
|
476
|
-
.listCustomModels(request, options, wrappedCallback)
|
|
358
|
+
return this.innerApiCalls.listCustomModels(request, options, wrappedCallback)
|
|
477
359
|
?.then(([response, options, rawResponse]) => {
|
|
478
360
|
this._log.info('listCustomModels response %j', response);
|
|
479
361
|
return [response, options, rawResponse];
|
|
@@ -492,13 +374,10 @@ class SearchTuningServiceClient {
|
|
|
492
374
|
options = options || {};
|
|
493
375
|
options.otherArgs = options.otherArgs || {};
|
|
494
376
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
495
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
496
|
-
|
|
497
|
-
data_store: request.dataStore ?? '',
|
|
498
|
-
});
|
|
499
|
-
this.initialize().catch(err => {
|
|
500
|
-
throw err;
|
|
377
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
378
|
+
'data_store': request.dataStore ?? '',
|
|
501
379
|
});
|
|
380
|
+
this.initialize().catch(err => { throw err; });
|
|
502
381
|
const wrappedCallback = callback
|
|
503
382
|
? (error, response, rawResponse, _) => {
|
|
504
383
|
this._log.info('trainCustomModel response %j', rawResponse);
|
|
@@ -506,8 +385,7 @@ class SearchTuningServiceClient {
|
|
|
506
385
|
}
|
|
507
386
|
: undefined;
|
|
508
387
|
this._log.info('trainCustomModel request %j', request);
|
|
509
|
-
return this.innerApiCalls
|
|
510
|
-
.trainCustomModel(request, options, wrappedCallback)
|
|
388
|
+
return this.innerApiCalls.trainCustomModel(request, options, wrappedCallback)
|
|
511
389
|
?.then(([response, rawResponse, _]) => {
|
|
512
390
|
this._log.info('trainCustomModel response %j', rawResponse);
|
|
513
391
|
return [response, rawResponse, _];
|
|
@@ -532,90 +410,90 @@ class SearchTuningServiceClient {
|
|
|
532
410
|
return decodeOperation;
|
|
533
411
|
}
|
|
534
412
|
/**
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
413
|
+
* Gets information about a location.
|
|
414
|
+
*
|
|
415
|
+
* @param {Object} request
|
|
416
|
+
* The request object that will be sent.
|
|
417
|
+
* @param {string} request.name
|
|
418
|
+
* Resource name for the location.
|
|
419
|
+
* @param {object} [options]
|
|
420
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
|
421
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
422
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
|
423
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
424
|
+
* for more details and examples.
|
|
425
|
+
* @example
|
|
426
|
+
* ```
|
|
427
|
+
* const [response] = await client.getLocation(request);
|
|
428
|
+
* ```
|
|
429
|
+
*/
|
|
552
430
|
getLocation(request, options, callback) {
|
|
553
431
|
return this.locationsClient.getLocation(request, options, callback);
|
|
554
432
|
}
|
|
555
433
|
/**
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
434
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
|
435
|
+
*
|
|
436
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
437
|
+
* @param {Object} request
|
|
438
|
+
* The request object that will be sent.
|
|
439
|
+
* @param {string} request.name
|
|
440
|
+
* The resource that owns the locations collection, if applicable.
|
|
441
|
+
* @param {string} request.filter
|
|
442
|
+
* The standard list filter.
|
|
443
|
+
* @param {number} request.pageSize
|
|
444
|
+
* The standard list page size.
|
|
445
|
+
* @param {string} request.pageToken
|
|
446
|
+
* The standard list page token.
|
|
447
|
+
* @param {object} [options]
|
|
448
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
449
|
+
* @returns {Object}
|
|
450
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
451
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
452
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
|
453
|
+
* so you can stop the iteration when you don't need more results.
|
|
454
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
455
|
+
* for more details and examples.
|
|
456
|
+
* @example
|
|
457
|
+
* ```
|
|
458
|
+
* const iterable = client.listLocationsAsync(request);
|
|
459
|
+
* for await (const response of iterable) {
|
|
460
|
+
* // process response
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
586
464
|
listLocationsAsync(request, options) {
|
|
587
465
|
return this.locationsClient.listLocationsAsync(request, options);
|
|
588
466
|
}
|
|
589
467
|
/**
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
468
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
|
469
|
+
* method to poll the operation result at intervals as recommended by the API
|
|
470
|
+
* service.
|
|
471
|
+
*
|
|
472
|
+
* @param {Object} request - The request object that will be sent.
|
|
473
|
+
* @param {string} request.name - The name of the operation resource.
|
|
474
|
+
* @param {Object=} options
|
|
475
|
+
* Optional parameters. You can override the default settings for this call,
|
|
476
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
477
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
478
|
+
* for the details.
|
|
479
|
+
* @param {function(?Error, ?Object)=} callback
|
|
480
|
+
* The function which will be called with the result of the API call.
|
|
481
|
+
*
|
|
482
|
+
* The second parameter to the callback is an object representing
|
|
483
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
484
|
+
* @return {Promise} - The promise which resolves to an array.
|
|
485
|
+
* The first element of the array is an object representing
|
|
486
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
487
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* ```
|
|
491
|
+
* const client = longrunning.operationsClient();
|
|
492
|
+
* const name = '';
|
|
493
|
+
* const [response] = await client.getOperation({name});
|
|
494
|
+
* // doThingsWith(response)
|
|
495
|
+
* ```
|
|
496
|
+
*/
|
|
619
497
|
getOperation(request, optionsOrCallback, callback) {
|
|
620
498
|
let options;
|
|
621
499
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -3004,8 +2882,8 @@ class SearchTuningServiceClient {
|
|
|
3004
2882
|
this._log.info('ending gRPC channel');
|
|
3005
2883
|
this._terminated = true;
|
|
3006
2884
|
stub.close();
|
|
3007
|
-
this.locationsClient.close();
|
|
3008
|
-
this.operationsClient.close();
|
|
2885
|
+
this.locationsClient.close().catch(err => { throw err; });
|
|
2886
|
+
void this.operationsClient.close();
|
|
3009
2887
|
});
|
|
3010
2888
|
}
|
|
3011
2889
|
return Promise.resolve();
|
|
@@ -144,61 +144,61 @@ export declare class ServingConfigServiceClient {
|
|
|
144
144
|
*/
|
|
145
145
|
updateServingConfig(request?: protos.google.cloud.discoveryengine.v1.IUpdateServingConfigRequest, options?: CallOptions): Promise<[
|
|
146
146
|
protos.google.cloud.discoveryengine.v1.IServingConfig,
|
|
147
|
-
|
|
147
|
+
protos.google.cloud.discoveryengine.v1.IUpdateServingConfigRequest | undefined,
|
|
148
148
|
{} | undefined
|
|
149
149
|
]>;
|
|
150
150
|
updateServingConfig(request: protos.google.cloud.discoveryengine.v1.IUpdateServingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1.IServingConfig, protos.google.cloud.discoveryengine.v1.IUpdateServingConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
151
151
|
updateServingConfig(request: protos.google.cloud.discoveryengine.v1.IUpdateServingConfigRequest, callback: Callback<protos.google.cloud.discoveryengine.v1.IServingConfig, protos.google.cloud.discoveryengine.v1.IUpdateServingConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
152
152
|
/**
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
153
|
+
* Gets information about a location.
|
|
154
|
+
*
|
|
155
|
+
* @param {Object} request
|
|
156
|
+
* The request object that will be sent.
|
|
157
|
+
* @param {string} request.name
|
|
158
|
+
* Resource name for the location.
|
|
159
|
+
* @param {object} [options]
|
|
160
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
|
161
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
162
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
|
163
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
164
|
+
* for more details and examples.
|
|
165
|
+
* @example
|
|
166
|
+
* ```
|
|
167
|
+
* const [response] = await client.getLocation(request);
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
170
|
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>;
|
|
171
171
|
/**
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
172
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
|
173
|
+
*
|
|
174
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
175
|
+
* @param {Object} request
|
|
176
|
+
* The request object that will be sent.
|
|
177
|
+
* @param {string} request.name
|
|
178
|
+
* The resource that owns the locations collection, if applicable.
|
|
179
|
+
* @param {string} request.filter
|
|
180
|
+
* The standard list filter.
|
|
181
|
+
* @param {number} request.pageSize
|
|
182
|
+
* The standard list page size.
|
|
183
|
+
* @param {string} request.pageToken
|
|
184
|
+
* The standard list page token.
|
|
185
|
+
* @param {object} [options]
|
|
186
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
187
|
+
* @returns {Object}
|
|
188
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
189
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
190
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
|
191
|
+
* so you can stop the iteration when you don't need more results.
|
|
192
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
193
|
+
* for more details and examples.
|
|
194
|
+
* @example
|
|
195
|
+
* ```
|
|
196
|
+
* const iterable = client.listLocationsAsync(request);
|
|
197
|
+
* for await (const response of iterable) {
|
|
198
|
+
* // process response
|
|
199
|
+
* }
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
202
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
|
203
203
|
/**
|
|
204
204
|
* Return a fully-qualified engine resource name string.
|