@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,28 +97,18 @@ class EstimateBillingServiceClient {
|
|
97
97
|
*/
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
|
-
const staticMembers = this
|
101
|
-
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
const staticMembers = this.constructor;
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
103
|
}
|
107
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
108
|
-
|
109
|
-
: undefined;
|
110
|
-
this._universeDomain =
|
111
|
-
opts?.universeDomain ??
|
112
|
-
opts?.universe_domain ??
|
113
|
-
universeDomainEnvVar ??
|
114
|
-
'googleapis.com';
|
104
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
105
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
115
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
109
|
const port = opts?.port || staticMembers.port;
|
119
110
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
113
|
// Request numeric enum values if REST transport is used.
|
124
114
|
opts.numericEnums = true;
|
@@ -148,7 +138,10 @@ class EstimateBillingServiceClient {
|
|
148
138
|
}
|
149
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
140
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
152
145
|
if (typeof process === 'object' && 'versions' in process) {
|
153
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
147
|
}
|
@@ -215,125 +208,20 @@ class EstimateBillingServiceClient {
|
|
215
208
|
// rather than holding a request open.
|
216
209
|
const lroOptions = {
|
217
210
|
auth: this.auth,
|
218
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
211
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
219
212
|
};
|
220
213
|
if (opts.fallback) {
|
221
214
|
lroOptions.protoJson = protoFilesRoot;
|
222
|
-
lroOptions.httpRules = [
|
223
|
-
{
|
224
|
-
|
225
|
-
|
226
|
-
body: '*',
|
227
|
-
additional_bindings: [
|
228
|
-
{
|
229
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
230
|
-
body: '*',
|
231
|
-
},
|
232
|
-
],
|
233
|
-
},
|
234
|
-
{
|
235
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
236
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
237
|
-
additional_bindings: [
|
238
|
-
{
|
239
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
240
|
-
},
|
241
|
-
{
|
242
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
243
|
-
},
|
244
|
-
{
|
245
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
246
|
-
},
|
247
|
-
{
|
248
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
249
|
-
},
|
250
|
-
{
|
251
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
252
|
-
},
|
253
|
-
{
|
254
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
255
|
-
},
|
256
|
-
{
|
257
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
258
|
-
},
|
259
|
-
{
|
260
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
261
|
-
},
|
262
|
-
{
|
263
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
267
|
-
},
|
268
|
-
{
|
269
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
270
|
-
},
|
271
|
-
{
|
272
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
273
|
-
},
|
274
|
-
{
|
275
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
276
|
-
},
|
277
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
278
|
-
{
|
279
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
280
|
-
},
|
281
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
282
|
-
],
|
283
|
-
},
|
284
|
-
{
|
285
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
286
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
287
|
-
additional_bindings: [
|
288
|
-
{
|
289
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
290
|
-
},
|
291
|
-
{
|
292
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
293
|
-
},
|
294
|
-
{
|
295
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
296
|
-
},
|
297
|
-
{
|
298
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
302
|
-
},
|
303
|
-
{
|
304
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
308
|
-
},
|
309
|
-
{
|
310
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
311
|
-
},
|
312
|
-
{
|
313
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
314
|
-
},
|
315
|
-
{
|
316
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
317
|
-
},
|
318
|
-
{
|
319
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
320
|
-
},
|
321
|
-
{
|
322
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
323
|
-
},
|
324
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
325
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
326
|
-
],
|
327
|
-
},
|
328
|
-
];
|
215
|
+
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: '*', }],
|
216
|
+
}, { 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/*}', }],
|
217
|
+
}, { 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', }],
|
218
|
+
}];
|
329
219
|
}
|
330
|
-
this.operationsClient = this._gaxModule
|
331
|
-
.lro(lroOptions)
|
332
|
-
.operationsClient(opts);
|
220
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
333
221
|
const estimateDataSizeResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.EstimateDataSizeResponse');
|
334
222
|
const estimateDataSizeMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.EstimateDataSizeMetadata');
|
335
223
|
this.descriptors.longrunning = {
|
336
|
-
estimateDataSize: new this._gaxModule.LongrunningDescriptor(this.operationsClient, estimateDataSizeResponse.decode.bind(estimateDataSizeResponse), estimateDataSizeMetadata.decode.bind(estimateDataSizeMetadata))
|
224
|
+
estimateDataSize: new this._gaxModule.LongrunningDescriptor(this.operationsClient, estimateDataSizeResponse.decode.bind(estimateDataSizeResponse), estimateDataSizeMetadata.decode.bind(estimateDataSizeMetadata))
|
337
225
|
};
|
338
226
|
// Put together the default options sent with requests.
|
339
227
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.EstimateBillingService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -362,11 +250,10 @@ class EstimateBillingServiceClient {
|
|
362
250
|
}
|
363
251
|
// Put together the "service stub" for
|
364
252
|
// google.cloud.discoveryengine.v1alpha.EstimateBillingService.
|
365
|
-
this.estimateBillingServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
.EstimateBillingService, this._opts, this._providedCustomServicePath);
|
253
|
+
this.estimateBillingServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
254
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.EstimateBillingService') :
|
255
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
256
|
+
this._protos.google.cloud.discoveryengine.v1alpha.EstimateBillingService, this._opts, this._providedCustomServicePath);
|
370
257
|
// Iterate over each of the methods that the service provides
|
371
258
|
// and create an API call method for each.
|
372
259
|
const estimateBillingServiceStubMethods = ['estimateDataSize'];
|
@@ -380,7 +267,8 @@ class EstimateBillingServiceClient {
|
|
380
267
|
}, (err) => () => {
|
381
268
|
throw err;
|
382
269
|
});
|
383
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
270
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
271
|
+
undefined;
|
384
272
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
385
273
|
this.innerApiCalls[methodName] = apiCall;
|
386
274
|
}
|
@@ -392,8 +280,7 @@ class EstimateBillingServiceClient {
|
|
392
280
|
* @returns {string} The DNS address for this service.
|
393
281
|
*/
|
394
282
|
static get servicePath() {
|
395
|
-
if (typeof process === 'object' &&
|
396
|
-
typeof process.emitWarning === 'function') {
|
283
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
397
284
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
398
285
|
}
|
399
286
|
return 'discoveryengine.googleapis.com';
|
@@ -404,8 +291,7 @@ class EstimateBillingServiceClient {
|
|
404
291
|
* @returns {string} The DNS address for this service.
|
405
292
|
*/
|
406
293
|
static get apiEndpoint() {
|
407
|
-
if (typeof process === 'object' &&
|
408
|
-
typeof process.emitWarning === 'function') {
|
294
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
409
295
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
410
296
|
}
|
411
297
|
return 'discoveryengine.googleapis.com';
|
@@ -433,7 +319,9 @@ class EstimateBillingServiceClient {
|
|
433
319
|
* @returns {string[]} List of default scopes.
|
434
320
|
*/
|
435
321
|
static get scopes() {
|
436
|
-
return [
|
322
|
+
return [
|
323
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
324
|
+
];
|
437
325
|
}
|
438
326
|
/**
|
439
327
|
* Return the project ID used by this class.
|
@@ -459,13 +347,10 @@ class EstimateBillingServiceClient {
|
|
459
347
|
options = options || {};
|
460
348
|
options.otherArgs = options.otherArgs || {};
|
461
349
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
462
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
463
|
-
|
464
|
-
location: request.location ?? '',
|
465
|
-
});
|
466
|
-
this.initialize().catch(err => {
|
467
|
-
throw err;
|
350
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
351
|
+
'location': request.location ?? '',
|
468
352
|
});
|
353
|
+
this.initialize().catch(err => { throw err; });
|
469
354
|
const wrappedCallback = callback
|
470
355
|
? (error, response, rawResponse, _) => {
|
471
356
|
this._log.info('estimateDataSize response %j', rawResponse);
|
@@ -473,8 +358,7 @@ class EstimateBillingServiceClient {
|
|
473
358
|
}
|
474
359
|
: undefined;
|
475
360
|
this._log.info('estimateDataSize request %j', request);
|
476
|
-
return this.innerApiCalls
|
477
|
-
.estimateDataSize(request, options, wrappedCallback)
|
361
|
+
return this.innerApiCalls.estimateDataSize(request, options, wrappedCallback)
|
478
362
|
?.then(([response, rawResponse, _]) => {
|
479
363
|
this._log.info('estimateDataSize response %j', rawResponse);
|
480
364
|
return [response, rawResponse, _];
|
@@ -499,90 +383,90 @@ class EstimateBillingServiceClient {
|
|
499
383
|
return decodeOperation;
|
500
384
|
}
|
501
385
|
/**
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
386
|
+
* Gets information about a location.
|
387
|
+
*
|
388
|
+
* @param {Object} request
|
389
|
+
* The request object that will be sent.
|
390
|
+
* @param {string} request.name
|
391
|
+
* Resource name for the location.
|
392
|
+
* @param {object} [options]
|
393
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
394
|
+
* @returns {Promise} - The promise which resolves to an array.
|
395
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
396
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
397
|
+
* for more details and examples.
|
398
|
+
* @example
|
399
|
+
* ```
|
400
|
+
* const [response] = await client.getLocation(request);
|
401
|
+
* ```
|
402
|
+
*/
|
519
403
|
getLocation(request, options, callback) {
|
520
404
|
return this.locationsClient.getLocation(request, options, callback);
|
521
405
|
}
|
522
406
|
/**
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
407
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
408
|
+
*
|
409
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
410
|
+
* @param {Object} request
|
411
|
+
* The request object that will be sent.
|
412
|
+
* @param {string} request.name
|
413
|
+
* The resource that owns the locations collection, if applicable.
|
414
|
+
* @param {string} request.filter
|
415
|
+
* The standard list filter.
|
416
|
+
* @param {number} request.pageSize
|
417
|
+
* The standard list page size.
|
418
|
+
* @param {string} request.pageToken
|
419
|
+
* The standard list page token.
|
420
|
+
* @param {object} [options]
|
421
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
422
|
+
* @returns {Object}
|
423
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
424
|
+
* When you iterate the returned iterable, each element will be an object representing
|
425
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
426
|
+
* so you can stop the iteration when you don't need more results.
|
427
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
428
|
+
* for more details and examples.
|
429
|
+
* @example
|
430
|
+
* ```
|
431
|
+
* const iterable = client.listLocationsAsync(request);
|
432
|
+
* for await (const response of iterable) {
|
433
|
+
* // process response
|
434
|
+
* }
|
435
|
+
* ```
|
436
|
+
*/
|
553
437
|
listLocationsAsync(request, options) {
|
554
438
|
return this.locationsClient.listLocationsAsync(request, options);
|
555
439
|
}
|
556
440
|
/**
|
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
|
-
|
441
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
442
|
+
* method to poll the operation result at intervals as recommended by the API
|
443
|
+
* service.
|
444
|
+
*
|
445
|
+
* @param {Object} request - The request object that will be sent.
|
446
|
+
* @param {string} request.name - The name of the operation resource.
|
447
|
+
* @param {Object=} options
|
448
|
+
* Optional parameters. You can override the default settings for this call,
|
449
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
450
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
451
|
+
* for the details.
|
452
|
+
* @param {function(?Error, ?Object)=} callback
|
453
|
+
* The function which will be called with the result of the API call.
|
454
|
+
*
|
455
|
+
* The second parameter to the callback is an object representing
|
456
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
457
|
+
* @return {Promise} - The promise which resolves to an array.
|
458
|
+
* The first element of the array is an object representing
|
459
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
460
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
461
|
+
*
|
462
|
+
* @example
|
463
|
+
* ```
|
464
|
+
* const client = longrunning.operationsClient();
|
465
|
+
* const name = '';
|
466
|
+
* const [response] = await client.getOperation({name});
|
467
|
+
* // doThingsWith(response)
|
468
|
+
* ```
|
469
|
+
*/
|
586
470
|
getOperation(request, optionsOrCallback, callback) {
|
587
471
|
let options;
|
588
472
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -757,8 +641,7 @@ class EstimateBillingServiceClient {
|
|
757
641
|
* @returns {string} A string representing the project.
|
758
642
|
*/
|
759
643
|
matchProjectFromAclConfigName(aclConfigName) {
|
760
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
761
|
-
.project;
|
644
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
762
645
|
}
|
763
646
|
/**
|
764
647
|
* Parse the location from AclConfig resource.
|
@@ -768,8 +651,7 @@ class EstimateBillingServiceClient {
|
|
768
651
|
* @returns {string} A string representing the location.
|
769
652
|
*/
|
770
653
|
matchLocationFromAclConfigName(aclConfigName) {
|
771
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
772
|
-
.location;
|
654
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
773
655
|
}
|
774
656
|
/**
|
775
657
|
* Return a fully-qualified engine resource name string.
|
@@ -851,8 +733,7 @@ class EstimateBillingServiceClient {
|
|
851
733
|
* @returns {string} A string representing the project.
|
852
734
|
*/
|
853
735
|
matchProjectFromEvaluationName(evaluationName) {
|
854
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
855
|
-
.project;
|
736
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
856
737
|
}
|
857
738
|
/**
|
858
739
|
* Parse the location from Evaluation resource.
|
@@ -862,8 +743,7 @@ class EstimateBillingServiceClient {
|
|
862
743
|
* @returns {string} A string representing the location.
|
863
744
|
*/
|
864
745
|
matchLocationFromEvaluationName(evaluationName) {
|
865
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
866
|
-
.location;
|
746
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
867
747
|
}
|
868
748
|
/**
|
869
749
|
* Parse the evaluation from Evaluation resource.
|
@@ -873,8 +753,7 @@ class EstimateBillingServiceClient {
|
|
873
753
|
* @returns {string} A string representing the evaluation.
|
874
754
|
*/
|
875
755
|
matchEvaluationFromEvaluationName(evaluationName) {
|
876
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
877
|
-
.evaluation;
|
756
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
878
757
|
}
|
879
758
|
/**
|
880
759
|
* Return a fully-qualified location resource name string.
|
@@ -2974,8 +2853,7 @@ class EstimateBillingServiceClient {
|
|
2974
2853
|
* @returns {string} A string representing the project.
|
2975
2854
|
*/
|
2976
2855
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
2977
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2978
|
-
.project;
|
2856
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
2979
2857
|
}
|
2980
2858
|
/**
|
2981
2859
|
* Parse the location from SampleQuery resource.
|
@@ -2985,8 +2863,7 @@ class EstimateBillingServiceClient {
|
|
2985
2863
|
* @returns {string} A string representing the location.
|
2986
2864
|
*/
|
2987
2865
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
2988
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2989
|
-
.location;
|
2866
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
2990
2867
|
}
|
2991
2868
|
/**
|
2992
2869
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -2996,8 +2873,7 @@ class EstimateBillingServiceClient {
|
|
2996
2873
|
* @returns {string} A string representing the sample_query_set.
|
2997
2874
|
*/
|
2998
2875
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
2999
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3000
|
-
.sample_query_set;
|
2876
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3001
2877
|
}
|
3002
2878
|
/**
|
3003
2879
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3007,8 +2883,7 @@ class EstimateBillingServiceClient {
|
|
3007
2883
|
* @returns {string} A string representing the sample_query.
|
3008
2884
|
*/
|
3009
2885
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3010
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3011
|
-
.sample_query;
|
2886
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3012
2887
|
}
|
3013
2888
|
/**
|
3014
2889
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3067,8 +2942,8 @@ class EstimateBillingServiceClient {
|
|
3067
2942
|
this._log.info('ending gRPC channel');
|
3068
2943
|
this._terminated = true;
|
3069
2944
|
stub.close();
|
3070
|
-
this.locationsClient.close();
|
3071
|
-
this.operationsClient.close();
|
2945
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2946
|
+
void this.operationsClient.close();
|
3072
2947
|
});
|
3073
2948
|
}
|
3074
2949
|
return Promise.resolve();
|