@google-cloud/discoveryengine 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5415 -578
- package/build/protos/protos.js +77830 -63391
- package/build/protos/protos.json +1537 -92
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -22
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +166 -76
- package/build/src/v1/completion_service_client.js +258 -263
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +171 -81
- package/build/src/v1/control_service_client.js +246 -132
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +233 -143
- package/build/src/v1/conversational_search_service_client.js +330 -226
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +218 -122
- package/build/src/v1/data_store_service_client.js +273 -281
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +210 -120
- package/build/src/v1/document_service_client.js +300 -301
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +193 -103
- package/build/src/v1/engine_service_client.js +273 -280
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
- package/build/src/v1/grounded_generation_service_client.js +217 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +166 -76
- package/build/src/v1/project_service_client.js +235 -223
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +137 -47
- package/build/src/v1/rank_service_client.js +204 -85
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +137 -47
- package/build/src/v1/recommendation_service_client.js +202 -82
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +201 -111
- package/build/src/v1/schema_service_client.js +264 -274
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +661 -571
- package/build/src/v1/search_service_client.js +216 -113
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +167 -77
- package/build/src/v1/search_tuning_service_client.js +246 -236
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +138 -48
- package/build/src/v1/serving_config_service_client.js +201 -80
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
- package/build/src/v1/site_search_engine_service_client.js +324 -379
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +167 -77
- package/build/src/v1/user_event_service_client.js +260 -254
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +94 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +98 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +141 -281
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +129 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +211 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +176 -317
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +193 -329
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +180 -326
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +150 -296
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +139 -263
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +87 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +85 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +169 -302
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +147 -293
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +129 -254
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +109 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +143 -272
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +149 -280
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +127 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +209 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +154 -289
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +181 -310
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +178 -316
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +148 -286
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +98 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +116 -232
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +85 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +83 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +167 -292
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +128 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +145 -283
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +127 -244
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +107 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +205 -387
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +141 -262
- package/package.json +7 -7
- package/CHANGELOG.md +0 -267
@@ -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
|
}
|
@@ -207,131 +201,26 @@ class SearchTuningServiceClient {
|
|
207
201
|
sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
|
208
202
|
sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
|
209
203
|
};
|
210
|
-
const protoFilesRoot = this._gaxModule.
|
204
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
211
205
|
// This API contains "long-running operations", which return a
|
212
206
|
// an Operation object that allows for tracking of the operation,
|
213
207
|
// rather than holding a request open.
|
214
208
|
const lroOptions = {
|
215
209
|
auth: this.auth,
|
216
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
210
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
217
211
|
};
|
218
212
|
if (opts.fallback) {
|
219
213
|
lroOptions.protoJson = protoFilesRoot;
|
220
|
-
lroOptions.httpRules = [
|
221
|
-
{
|
222
|
-
|
223
|
-
|
224
|
-
body: '*',
|
225
|
-
additional_bindings: [
|
226
|
-
{
|
227
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
228
|
-
body: '*',
|
229
|
-
},
|
230
|
-
],
|
231
|
-
},
|
232
|
-
{
|
233
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
234
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
235
|
-
additional_bindings: [
|
236
|
-
{
|
237
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
238
|
-
},
|
239
|
-
{
|
240
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
241
|
-
},
|
242
|
-
{
|
243
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
244
|
-
},
|
245
|
-
{
|
246
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
247
|
-
},
|
248
|
-
{
|
249
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
250
|
-
},
|
251
|
-
{
|
252
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
253
|
-
},
|
254
|
-
{
|
255
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
256
|
-
},
|
257
|
-
{
|
258
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
259
|
-
},
|
260
|
-
{
|
261
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
262
|
-
},
|
263
|
-
{
|
264
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
265
|
-
},
|
266
|
-
{
|
267
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
268
|
-
},
|
269
|
-
{
|
270
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
271
|
-
},
|
272
|
-
{
|
273
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
274
|
-
},
|
275
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
276
|
-
{
|
277
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
278
|
-
},
|
279
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
280
|
-
],
|
281
|
-
},
|
282
|
-
{
|
283
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
284
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
285
|
-
additional_bindings: [
|
286
|
-
{
|
287
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
288
|
-
},
|
289
|
-
{
|
290
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
291
|
-
},
|
292
|
-
{
|
293
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
294
|
-
},
|
295
|
-
{
|
296
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
297
|
-
},
|
298
|
-
{
|
299
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
300
|
-
},
|
301
|
-
{
|
302
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
303
|
-
},
|
304
|
-
{
|
305
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
306
|
-
},
|
307
|
-
{
|
308
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
309
|
-
},
|
310
|
-
{
|
311
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
312
|
-
},
|
313
|
-
{
|
314
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
315
|
-
},
|
316
|
-
{
|
317
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
318
|
-
},
|
319
|
-
{
|
320
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
321
|
-
},
|
322
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
323
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
324
|
-
],
|
325
|
-
},
|
326
|
-
];
|
214
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
215
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/operations/*}', }],
|
216
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*}/operations', }, { get: '/v1alpha/{name=projects/*}/operations', }],
|
217
|
+
}];
|
327
218
|
}
|
328
|
-
this.operationsClient = this._gaxModule
|
329
|
-
.lro(lroOptions)
|
330
|
-
.operationsClient(opts);
|
219
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
331
220
|
const trainCustomModelResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.TrainCustomModelResponse');
|
332
221
|
const trainCustomModelMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.TrainCustomModelMetadata');
|
333
222
|
this.descriptors.longrunning = {
|
334
|
-
trainCustomModel: new this._gaxModule.LongrunningDescriptor(this.operationsClient, trainCustomModelResponse.decode.bind(trainCustomModelResponse), trainCustomModelMetadata.decode.bind(trainCustomModelMetadata))
|
223
|
+
trainCustomModel: new this._gaxModule.LongrunningDescriptor(this.operationsClient, trainCustomModelResponse.decode.bind(trainCustomModelResponse), trainCustomModelMetadata.decode.bind(trainCustomModelMetadata))
|
335
224
|
};
|
336
225
|
// Put together the default options sent with requests.
|
337
226
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SearchTuningService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -360,17 +249,13 @@ class SearchTuningServiceClient {
|
|
360
249
|
}
|
361
250
|
// Put together the "service stub" for
|
362
251
|
// google.cloud.discoveryengine.v1alpha.SearchTuningService.
|
363
|
-
this.searchTuningServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
.SearchTuningService, this._opts, this._providedCustomServicePath);
|
252
|
+
this.searchTuningServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
253
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SearchTuningService') :
|
254
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
255
|
+
this._protos.google.cloud.discoveryengine.v1alpha.SearchTuningService, this._opts, this._providedCustomServicePath);
|
368
256
|
// Iterate over each of the methods that the service provides
|
369
257
|
// and create an API call method for each.
|
370
|
-
const searchTuningServiceStubMethods = [
|
371
|
-
'trainCustomModel',
|
372
|
-
'listCustomModels',
|
373
|
-
];
|
258
|
+
const searchTuningServiceStubMethods = ['trainCustomModel', 'listCustomModels'];
|
374
259
|
for (const methodName of searchTuningServiceStubMethods) {
|
375
260
|
const callPromise = this.searchTuningServiceStub.then(stub => (...args) => {
|
376
261
|
if (this._terminated) {
|
@@ -381,7 +266,8 @@ class SearchTuningServiceClient {
|
|
381
266
|
}, (err) => () => {
|
382
267
|
throw err;
|
383
268
|
});
|
384
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
269
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
270
|
+
undefined;
|
385
271
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
386
272
|
this.innerApiCalls[methodName] = apiCall;
|
387
273
|
}
|
@@ -393,8 +279,7 @@ class SearchTuningServiceClient {
|
|
393
279
|
* @returns {string} The DNS address for this service.
|
394
280
|
*/
|
395
281
|
static get servicePath() {
|
396
|
-
if (typeof process === 'object' &&
|
397
|
-
typeof process.emitWarning === 'function') {
|
282
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
398
283
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
399
284
|
}
|
400
285
|
return 'discoveryengine.googleapis.com';
|
@@ -405,8 +290,7 @@ class SearchTuningServiceClient {
|
|
405
290
|
* @returns {string} The DNS address for this service.
|
406
291
|
*/
|
407
292
|
static get apiEndpoint() {
|
408
|
-
if (typeof process === 'object' &&
|
409
|
-
typeof process.emitWarning === 'function') {
|
293
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
410
294
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
411
295
|
}
|
412
296
|
return 'discoveryengine.googleapis.com';
|
@@ -434,7 +318,9 @@ class SearchTuningServiceClient {
|
|
434
318
|
* @returns {string[]} List of default scopes.
|
435
319
|
*/
|
436
320
|
static get scopes() {
|
437
|
-
return [
|
321
|
+
return [
|
322
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
323
|
+
];
|
438
324
|
}
|
439
325
|
/**
|
440
326
|
* Return the project ID used by this class.
|
@@ -460,13 +346,10 @@ class SearchTuningServiceClient {
|
|
460
346
|
options = options || {};
|
461
347
|
options.otherArgs = options.otherArgs || {};
|
462
348
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
463
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
464
|
-
|
465
|
-
data_store: request.dataStore ?? '',
|
466
|
-
});
|
467
|
-
this.initialize().catch(err => {
|
468
|
-
throw err;
|
349
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
350
|
+
'data_store': request.dataStore ?? '',
|
469
351
|
});
|
352
|
+
this.initialize().catch(err => { throw err; });
|
470
353
|
this._log.info('listCustomModels request %j', request);
|
471
354
|
const wrappedCallback = callback
|
472
355
|
? (error, response, options, rawResponse) => {
|
@@ -474,11 +357,16 @@ class SearchTuningServiceClient {
|
|
474
357
|
callback(error, response, options, rawResponse); // We verified callback above.
|
475
358
|
}
|
476
359
|
: undefined;
|
477
|
-
return this.innerApiCalls
|
478
|
-
.listCustomModels(request, options, wrappedCallback)
|
360
|
+
return this.innerApiCalls.listCustomModels(request, options, wrappedCallback)
|
479
361
|
?.then(([response, options, rawResponse]) => {
|
480
362
|
this._log.info('listCustomModels response %j', response);
|
481
363
|
return [response, options, rawResponse];
|
364
|
+
}).catch((error) => {
|
365
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
366
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
367
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
368
|
+
}
|
369
|
+
throw error;
|
482
370
|
});
|
483
371
|
}
|
484
372
|
trainCustomModel(request, optionsOrCallback, callback) {
|
@@ -494,13 +382,10 @@ class SearchTuningServiceClient {
|
|
494
382
|
options = options || {};
|
495
383
|
options.otherArgs = options.otherArgs || {};
|
496
384
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
497
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
498
|
-
|
499
|
-
data_store: request.dataStore ?? '',
|
500
|
-
});
|
501
|
-
this.initialize().catch(err => {
|
502
|
-
throw err;
|
385
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
386
|
+
'data_store': request.dataStore ?? '',
|
503
387
|
});
|
388
|
+
this.initialize().catch(err => { throw err; });
|
504
389
|
const wrappedCallback = callback
|
505
390
|
? (error, response, rawResponse, _) => {
|
506
391
|
this._log.info('trainCustomModel response %j', rawResponse);
|
@@ -508,8 +393,7 @@ class SearchTuningServiceClient {
|
|
508
393
|
}
|
509
394
|
: undefined;
|
510
395
|
this._log.info('trainCustomModel request %j', request);
|
511
|
-
return this.innerApiCalls
|
512
|
-
.trainCustomModel(request, options, wrappedCallback)
|
396
|
+
return this.innerApiCalls.trainCustomModel(request, options, wrappedCallback)
|
513
397
|
?.then(([response, rawResponse, _]) => {
|
514
398
|
this._log.info('trainCustomModel response %j', rawResponse);
|
515
399
|
return [response, rawResponse, _];
|
@@ -534,90 +418,90 @@ class SearchTuningServiceClient {
|
|
534
418
|
return decodeOperation;
|
535
419
|
}
|
536
420
|
/**
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
421
|
+
* Gets information about a location.
|
422
|
+
*
|
423
|
+
* @param {Object} request
|
424
|
+
* The request object that will be sent.
|
425
|
+
* @param {string} request.name
|
426
|
+
* Resource name for the location.
|
427
|
+
* @param {object} [options]
|
428
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
429
|
+
* @returns {Promise} - The promise which resolves to an array.
|
430
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
431
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
432
|
+
* for more details and examples.
|
433
|
+
* @example
|
434
|
+
* ```
|
435
|
+
* const [response] = await client.getLocation(request);
|
436
|
+
* ```
|
437
|
+
*/
|
554
438
|
getLocation(request, options, callback) {
|
555
439
|
return this.locationsClient.getLocation(request, options, callback);
|
556
440
|
}
|
557
441
|
/**
|
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
|
-
|
586
|
-
|
587
|
-
|
442
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
443
|
+
*
|
444
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
445
|
+
* @param {Object} request
|
446
|
+
* The request object that will be sent.
|
447
|
+
* @param {string} request.name
|
448
|
+
* The resource that owns the locations collection, if applicable.
|
449
|
+
* @param {string} request.filter
|
450
|
+
* The standard list filter.
|
451
|
+
* @param {number} request.pageSize
|
452
|
+
* The standard list page size.
|
453
|
+
* @param {string} request.pageToken
|
454
|
+
* The standard list page token.
|
455
|
+
* @param {object} [options]
|
456
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
457
|
+
* @returns {Object}
|
458
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
459
|
+
* When you iterate the returned iterable, each element will be an object representing
|
460
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
461
|
+
* so you can stop the iteration when you don't need more results.
|
462
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
463
|
+
* for more details and examples.
|
464
|
+
* @example
|
465
|
+
* ```
|
466
|
+
* const iterable = client.listLocationsAsync(request);
|
467
|
+
* for await (const response of iterable) {
|
468
|
+
* // process response
|
469
|
+
* }
|
470
|
+
* ```
|
471
|
+
*/
|
588
472
|
listLocationsAsync(request, options) {
|
589
473
|
return this.locationsClient.listLocationsAsync(request, options);
|
590
474
|
}
|
591
475
|
/**
|
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
|
-
|
619
|
-
|
620
|
-
|
476
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
477
|
+
* method to poll the operation result at intervals as recommended by the API
|
478
|
+
* service.
|
479
|
+
*
|
480
|
+
* @param {Object} request - The request object that will be sent.
|
481
|
+
* @param {string} request.name - The name of the operation resource.
|
482
|
+
* @param {Object=} options
|
483
|
+
* Optional parameters. You can override the default settings for this call,
|
484
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
485
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
486
|
+
* for the details.
|
487
|
+
* @param {function(?Error, ?Object)=} callback
|
488
|
+
* The function which will be called with the result of the API call.
|
489
|
+
*
|
490
|
+
* The second parameter to the callback is an object representing
|
491
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
492
|
+
* @return {Promise} - The promise which resolves to an array.
|
493
|
+
* The first element of the array is an object representing
|
494
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
495
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
496
|
+
*
|
497
|
+
* @example
|
498
|
+
* ```
|
499
|
+
* const client = longrunning.operationsClient();
|
500
|
+
* const name = '';
|
501
|
+
* const [response] = await client.getOperation({name});
|
502
|
+
* // doThingsWith(response)
|
503
|
+
* ```
|
504
|
+
*/
|
621
505
|
getOperation(request, optionsOrCallback, callback) {
|
622
506
|
let options;
|
623
507
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -792,8 +676,7 @@ class SearchTuningServiceClient {
|
|
792
676
|
* @returns {string} A string representing the project.
|
793
677
|
*/
|
794
678
|
matchProjectFromAclConfigName(aclConfigName) {
|
795
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
796
|
-
.project;
|
679
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
797
680
|
}
|
798
681
|
/**
|
799
682
|
* Parse the location from AclConfig resource.
|
@@ -803,8 +686,7 @@ class SearchTuningServiceClient {
|
|
803
686
|
* @returns {string} A string representing the location.
|
804
687
|
*/
|
805
688
|
matchLocationFromAclConfigName(aclConfigName) {
|
806
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
807
|
-
.location;
|
689
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
808
690
|
}
|
809
691
|
/**
|
810
692
|
* Return a fully-qualified engine resource name string.
|
@@ -886,8 +768,7 @@ class SearchTuningServiceClient {
|
|
886
768
|
* @returns {string} A string representing the project.
|
887
769
|
*/
|
888
770
|
matchProjectFromEvaluationName(evaluationName) {
|
889
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
890
|
-
.project;
|
771
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
891
772
|
}
|
892
773
|
/**
|
893
774
|
* Parse the location from Evaluation resource.
|
@@ -897,8 +778,7 @@ class SearchTuningServiceClient {
|
|
897
778
|
* @returns {string} A string representing the location.
|
898
779
|
*/
|
899
780
|
matchLocationFromEvaluationName(evaluationName) {
|
900
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
901
|
-
.location;
|
781
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
902
782
|
}
|
903
783
|
/**
|
904
784
|
* Parse the evaluation from Evaluation resource.
|
@@ -908,8 +788,7 @@ class SearchTuningServiceClient {
|
|
908
788
|
* @returns {string} A string representing the evaluation.
|
909
789
|
*/
|
910
790
|
matchEvaluationFromEvaluationName(evaluationName) {
|
911
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
912
|
-
.evaluation;
|
791
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
913
792
|
}
|
914
793
|
/**
|
915
794
|
* Return a fully-qualified project resource name string.
|
@@ -2976,8 +2855,7 @@ class SearchTuningServiceClient {
|
|
2976
2855
|
* @returns {string} A string representing the project.
|
2977
2856
|
*/
|
2978
2857
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
2979
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2980
|
-
.project;
|
2858
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
2981
2859
|
}
|
2982
2860
|
/**
|
2983
2861
|
* Parse the location from SampleQuery resource.
|
@@ -2987,8 +2865,7 @@ class SearchTuningServiceClient {
|
|
2987
2865
|
* @returns {string} A string representing the location.
|
2988
2866
|
*/
|
2989
2867
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
2990
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2991
|
-
.location;
|
2868
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
2992
2869
|
}
|
2993
2870
|
/**
|
2994
2871
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -2998,8 +2875,7 @@ class SearchTuningServiceClient {
|
|
2998
2875
|
* @returns {string} A string representing the sample_query_set.
|
2999
2876
|
*/
|
3000
2877
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3001
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3002
|
-
.sample_query_set;
|
2878
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3003
2879
|
}
|
3004
2880
|
/**
|
3005
2881
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3009,8 +2885,7 @@ class SearchTuningServiceClient {
|
|
3009
2885
|
* @returns {string} A string representing the sample_query.
|
3010
2886
|
*/
|
3011
2887
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3012
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3013
|
-
.sample_query;
|
2888
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3014
2889
|
}
|
3015
2890
|
/**
|
3016
2891
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3069,8 +2944,8 @@ class SearchTuningServiceClient {
|
|
3069
2944
|
this._log.info('ending gRPC channel');
|
3070
2945
|
this._terminated = true;
|
3071
2946
|
stub.close();
|
3072
|
-
this.locationsClient.close();
|
3073
|
-
this.operationsClient.close();
|
2947
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2948
|
+
void this.operationsClient.close();
|
3074
2949
|
});
|
3075
2950
|
}
|
3076
2951
|
return Promise.resolve();
|