@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
@@ -99,26 +99,17 @@ class DataStoreServiceClient {
|
|
99
99
|
constructor(opts, gaxInstance) {
|
100
100
|
// Ensure that options include all the required fields.
|
101
101
|
const staticMembers = this.constructor;
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
102
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
103
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
104
|
}
|
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';
|
105
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
106
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
115
107
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
108
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
109
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
110
|
const port = opts?.port || staticMembers.port;
|
119
111
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
112
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
113
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
114
|
// Request numeric enum values if REST transport is used.
|
124
115
|
opts.numericEnums = true;
|
@@ -148,7 +139,10 @@ class DataStoreServiceClient {
|
|
148
139
|
}
|
149
140
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
141
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
142
|
+
const clientHeader = [
|
143
|
+
`gax/${this._gaxModule.version}`,
|
144
|
+
`gapic/${version}`,
|
145
|
+
];
|
152
146
|
if (typeof process === 'object' && 'versions' in process) {
|
153
147
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
148
|
}
|
@@ -215,7 +209,7 @@ class DataStoreServiceClient {
|
|
215
209
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
216
210
|
// pages). Denote the keys used for pagination and results.
|
217
211
|
this.descriptors.page = {
|
218
|
-
listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
|
212
|
+
listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
|
219
213
|
};
|
220
214
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
221
215
|
// This API contains "long-running operations", which return a
|
@@ -223,122 +217,23 @@ class DataStoreServiceClient {
|
|
223
217
|
// rather than holding a request open.
|
224
218
|
const lroOptions = {
|
225
219
|
auth: this.auth,
|
226
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
220
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
227
221
|
};
|
228
222
|
if (opts.fallback) {
|
229
223
|
lroOptions.protoJson = protoFilesRoot;
|
230
|
-
lroOptions.httpRules = [
|
231
|
-
{
|
232
|
-
|
233
|
-
|
234
|
-
body: '*',
|
235
|
-
additional_bindings: [
|
236
|
-
{
|
237
|
-
post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
238
|
-
body: '*',
|
239
|
-
},
|
240
|
-
],
|
241
|
-
},
|
242
|
-
{
|
243
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
244
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
245
|
-
additional_bindings: [
|
246
|
-
{
|
247
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
248
|
-
},
|
249
|
-
{
|
250
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
251
|
-
},
|
252
|
-
{
|
253
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
254
|
-
},
|
255
|
-
{
|
256
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
257
|
-
},
|
258
|
-
{
|
259
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
260
|
-
},
|
261
|
-
{
|
262
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
263
|
-
},
|
264
|
-
{
|
265
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
266
|
-
},
|
267
|
-
{
|
268
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
|
269
|
-
},
|
270
|
-
{
|
271
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
272
|
-
},
|
273
|
-
{
|
274
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
275
|
-
},
|
276
|
-
{
|
277
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
278
|
-
},
|
279
|
-
{
|
280
|
-
get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
281
|
-
},
|
282
|
-
{ get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
|
283
|
-
{
|
284
|
-
get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
285
|
-
},
|
286
|
-
{ get: '/v1beta/{name=projects/*/operations/*}' },
|
287
|
-
],
|
288
|
-
},
|
289
|
-
{
|
290
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
291
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
292
|
-
additional_bindings: [
|
293
|
-
{
|
294
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
295
|
-
},
|
296
|
-
{
|
297
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
298
|
-
},
|
299
|
-
{
|
300
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
301
|
-
},
|
302
|
-
{
|
303
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
304
|
-
},
|
305
|
-
{
|
306
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
307
|
-
},
|
308
|
-
{
|
309
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
310
|
-
},
|
311
|
-
{
|
312
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
313
|
-
},
|
314
|
-
{
|
315
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
|
316
|
-
},
|
317
|
-
{
|
318
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
319
|
-
},
|
320
|
-
{
|
321
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
322
|
-
},
|
323
|
-
{
|
324
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
|
325
|
-
},
|
326
|
-
{ get: '/v1beta/{name=projects/*/locations/*}/operations' },
|
327
|
-
{ get: '/v1beta/{name=projects/*}/operations' },
|
328
|
-
],
|
329
|
-
},
|
330
|
-
];
|
224
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
225
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1beta/{name=projects/*/operations/*}', }],
|
226
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*}/operations', }, { get: '/v1beta/{name=projects/*}/operations', }],
|
227
|
+
}];
|
331
228
|
}
|
332
|
-
this.operationsClient = this._gaxModule
|
333
|
-
.lro(lroOptions)
|
334
|
-
.operationsClient(opts);
|
229
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
335
230
|
const createDataStoreResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.DataStore');
|
336
231
|
const createDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.CreateDataStoreMetadata');
|
337
232
|
const deleteDataStoreResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
|
338
233
|
const deleteDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.DeleteDataStoreMetadata');
|
339
234
|
this.descriptors.longrunning = {
|
340
235
|
createDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createDataStoreResponse.decode.bind(createDataStoreResponse), createDataStoreMetadata.decode.bind(createDataStoreMetadata)),
|
341
|
-
deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
|
236
|
+
deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
|
342
237
|
};
|
343
238
|
// Put together the default options sent with requests.
|
344
239
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.DataStoreService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -367,20 +262,13 @@ class DataStoreServiceClient {
|
|
367
262
|
}
|
368
263
|
// Put together the "service stub" for
|
369
264
|
// google.cloud.discoveryengine.v1beta.DataStoreService.
|
370
|
-
this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
.DataStoreService, this._opts, this._providedCustomServicePath);
|
265
|
+
this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
266
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1beta.DataStoreService') :
|
267
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
268
|
+
this._protos.google.cloud.discoveryengine.v1beta.DataStoreService, this._opts, this._providedCustomServicePath);
|
375
269
|
// Iterate over each of the methods that the service provides
|
376
270
|
// and create an API call method for each.
|
377
|
-
const dataStoreServiceStubMethods = [
|
378
|
-
'createDataStore',
|
379
|
-
'getDataStore',
|
380
|
-
'listDataStores',
|
381
|
-
'deleteDataStore',
|
382
|
-
'updateDataStore',
|
383
|
-
];
|
271
|
+
const dataStoreServiceStubMethods = ['createDataStore', 'getDataStore', 'listDataStores', 'deleteDataStore', 'updateDataStore'];
|
384
272
|
for (const methodName of dataStoreServiceStubMethods) {
|
385
273
|
const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
|
386
274
|
if (this._terminated) {
|
@@ -405,8 +293,7 @@ class DataStoreServiceClient {
|
|
405
293
|
* @returns {string} The DNS address for this service.
|
406
294
|
*/
|
407
295
|
static get servicePath() {
|
408
|
-
if (typeof process === 'object' &&
|
409
|
-
typeof process.emitWarning === 'function') {
|
296
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
410
297
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
411
298
|
}
|
412
299
|
return 'discoveryengine.googleapis.com';
|
@@ -417,8 +304,7 @@ class DataStoreServiceClient {
|
|
417
304
|
* @returns {string} The DNS address for this service.
|
418
305
|
*/
|
419
306
|
static get apiEndpoint() {
|
420
|
-
if (typeof process === 'object' &&
|
421
|
-
typeof process.emitWarning === 'function') {
|
307
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
422
308
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
423
309
|
}
|
424
310
|
return 'discoveryengine.googleapis.com';
|
@@ -446,7 +332,9 @@ class DataStoreServiceClient {
|
|
446
332
|
* @returns {string[]} List of default scopes.
|
447
333
|
*/
|
448
334
|
static get scopes() {
|
449
|
-
return [
|
335
|
+
return [
|
336
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
337
|
+
];
|
450
338
|
}
|
451
339
|
/**
|
452
340
|
* Return the project ID used by this class.
|
@@ -472,13 +360,10 @@ class DataStoreServiceClient {
|
|
472
360
|
options = options || {};
|
473
361
|
options.otherArgs = options.otherArgs || {};
|
474
362
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
475
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
476
|
-
|
477
|
-
name: request.name ?? '',
|
478
|
-
});
|
479
|
-
this.initialize().catch(err => {
|
480
|
-
throw err;
|
363
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
364
|
+
'name': request.name ?? '',
|
481
365
|
});
|
366
|
+
this.initialize().catch(err => { throw err; });
|
482
367
|
this._log.info('getDataStore request %j', request);
|
483
368
|
const wrappedCallback = callback
|
484
369
|
? (error, response, options, rawResponse) => {
|
@@ -486,8 +371,7 @@ class DataStoreServiceClient {
|
|
486
371
|
callback(error, response, options, rawResponse); // We verified callback above.
|
487
372
|
}
|
488
373
|
: undefined;
|
489
|
-
return this.innerApiCalls
|
490
|
-
.getDataStore(request, options, wrappedCallback)
|
374
|
+
return this.innerApiCalls.getDataStore(request, options, wrappedCallback)
|
491
375
|
?.then(([response, options, rawResponse]) => {
|
492
376
|
this._log.info('getDataStore response %j', response);
|
493
377
|
return [response, options, rawResponse];
|
@@ -506,13 +390,10 @@ class DataStoreServiceClient {
|
|
506
390
|
options = options || {};
|
507
391
|
options.otherArgs = options.otherArgs || {};
|
508
392
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
509
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
510
|
-
|
511
|
-
'data_store.name': request.dataStore.name ?? '',
|
512
|
-
});
|
513
|
-
this.initialize().catch(err => {
|
514
|
-
throw err;
|
393
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
394
|
+
'data_store.name': request.dataStore.name ?? '',
|
515
395
|
});
|
396
|
+
this.initialize().catch(err => { throw err; });
|
516
397
|
this._log.info('updateDataStore request %j', request);
|
517
398
|
const wrappedCallback = callback
|
518
399
|
? (error, response, options, rawResponse) => {
|
@@ -520,8 +401,7 @@ class DataStoreServiceClient {
|
|
520
401
|
callback(error, response, options, rawResponse); // We verified callback above.
|
521
402
|
}
|
522
403
|
: undefined;
|
523
|
-
return this.innerApiCalls
|
524
|
-
.updateDataStore(request, options, wrappedCallback)
|
404
|
+
return this.innerApiCalls.updateDataStore(request, options, wrappedCallback)
|
525
405
|
?.then(([response, options, rawResponse]) => {
|
526
406
|
this._log.info('updateDataStore response %j', response);
|
527
407
|
return [response, options, rawResponse];
|
@@ -540,13 +420,10 @@ class DataStoreServiceClient {
|
|
540
420
|
options = options || {};
|
541
421
|
options.otherArgs = options.otherArgs || {};
|
542
422
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
543
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
544
|
-
|
545
|
-
parent: request.parent ?? '',
|
546
|
-
});
|
547
|
-
this.initialize().catch(err => {
|
548
|
-
throw err;
|
423
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
424
|
+
'parent': request.parent ?? '',
|
549
425
|
});
|
426
|
+
this.initialize().catch(err => { throw err; });
|
550
427
|
const wrappedCallback = callback
|
551
428
|
? (error, response, rawResponse, _) => {
|
552
429
|
this._log.info('createDataStore response %j', rawResponse);
|
@@ -554,8 +431,7 @@ class DataStoreServiceClient {
|
|
554
431
|
}
|
555
432
|
: undefined;
|
556
433
|
this._log.info('createDataStore request %j', request);
|
557
|
-
return this.innerApiCalls
|
558
|
-
.createDataStore(request, options, wrappedCallback)
|
434
|
+
return this.innerApiCalls.createDataStore(request, options, wrappedCallback)
|
559
435
|
?.then(([response, rawResponse, _]) => {
|
560
436
|
this._log.info('createDataStore response %j', rawResponse);
|
561
437
|
return [response, rawResponse, _];
|
@@ -592,13 +468,10 @@ class DataStoreServiceClient {
|
|
592
468
|
options = options || {};
|
593
469
|
options.otherArgs = options.otherArgs || {};
|
594
470
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
595
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
596
|
-
|
597
|
-
name: request.name ?? '',
|
598
|
-
});
|
599
|
-
this.initialize().catch(err => {
|
600
|
-
throw err;
|
471
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
472
|
+
'name': request.name ?? '',
|
601
473
|
});
|
474
|
+
this.initialize().catch(err => { throw err; });
|
602
475
|
const wrappedCallback = callback
|
603
476
|
? (error, response, rawResponse, _) => {
|
604
477
|
this._log.info('deleteDataStore response %j', rawResponse);
|
@@ -606,8 +479,7 @@ class DataStoreServiceClient {
|
|
606
479
|
}
|
607
480
|
: undefined;
|
608
481
|
this._log.info('deleteDataStore request %j', request);
|
609
|
-
return this.innerApiCalls
|
610
|
-
.deleteDataStore(request, options, wrappedCallback)
|
482
|
+
return this.innerApiCalls.deleteDataStore(request, options, wrappedCallback)
|
611
483
|
?.then(([response, rawResponse, _]) => {
|
612
484
|
this._log.info('deleteDataStore response %j', rawResponse);
|
613
485
|
return [response, rawResponse, _];
|
@@ -644,13 +516,10 @@ class DataStoreServiceClient {
|
|
644
516
|
options = options || {};
|
645
517
|
options.otherArgs = options.otherArgs || {};
|
646
518
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
647
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
648
|
-
|
649
|
-
parent: request.parent ?? '',
|
650
|
-
});
|
651
|
-
this.initialize().catch(err => {
|
652
|
-
throw err;
|
519
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
520
|
+
'parent': request.parent ?? '',
|
653
521
|
});
|
522
|
+
this.initialize().catch(err => { throw err; });
|
654
523
|
const wrappedCallback = callback
|
655
524
|
? (error, values, nextPageRequest, rawResponse) => {
|
656
525
|
this._log.info('listDataStores values %j', values);
|
@@ -714,15 +583,12 @@ class DataStoreServiceClient {
|
|
714
583
|
options = options || {};
|
715
584
|
options.otherArgs = options.otherArgs || {};
|
716
585
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
717
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
718
|
-
|
719
|
-
|
720
|
-
});
|
586
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
587
|
+
'parent': request.parent ?? '',
|
588
|
+
});
|
721
589
|
const defaultCallSettings = this._defaults['listDataStores'];
|
722
590
|
const callSettings = defaultCallSettings.merge(options);
|
723
|
-
this.initialize().catch(err => {
|
724
|
-
throw err;
|
725
|
-
});
|
591
|
+
this.initialize().catch(err => { throw err; });
|
726
592
|
this._log.info('listDataStores stream %j', request);
|
727
593
|
return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
|
728
594
|
}
|
@@ -778,103 +644,100 @@ class DataStoreServiceClient {
|
|
778
644
|
options = options || {};
|
779
645
|
options.otherArgs = options.otherArgs || {};
|
780
646
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
781
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
782
|
-
|
783
|
-
|
784
|
-
});
|
647
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
648
|
+
'parent': request.parent ?? '',
|
649
|
+
});
|
785
650
|
const defaultCallSettings = this._defaults['listDataStores'];
|
786
651
|
const callSettings = defaultCallSettings.merge(options);
|
787
|
-
this.initialize().catch(err => {
|
788
|
-
throw err;
|
789
|
-
});
|
652
|
+
this.initialize().catch(err => { throw err; });
|
790
653
|
this._log.info('listDataStores iterate %j', request);
|
791
654
|
return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
|
792
655
|
}
|
793
656
|
/**
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
657
|
+
* Gets information about a location.
|
658
|
+
*
|
659
|
+
* @param {Object} request
|
660
|
+
* The request object that will be sent.
|
661
|
+
* @param {string} request.name
|
662
|
+
* Resource name for the location.
|
663
|
+
* @param {object} [options]
|
664
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
665
|
+
* @returns {Promise} - The promise which resolves to an array.
|
666
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
667
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
668
|
+
* for more details and examples.
|
669
|
+
* @example
|
670
|
+
* ```
|
671
|
+
* const [response] = await client.getLocation(request);
|
672
|
+
* ```
|
673
|
+
*/
|
811
674
|
getLocation(request, options, callback) {
|
812
675
|
return this.locationsClient.getLocation(request, options, callback);
|
813
676
|
}
|
814
677
|
/**
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
678
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
679
|
+
*
|
680
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
681
|
+
* @param {Object} request
|
682
|
+
* The request object that will be sent.
|
683
|
+
* @param {string} request.name
|
684
|
+
* The resource that owns the locations collection, if applicable.
|
685
|
+
* @param {string} request.filter
|
686
|
+
* The standard list filter.
|
687
|
+
* @param {number} request.pageSize
|
688
|
+
* The standard list page size.
|
689
|
+
* @param {string} request.pageToken
|
690
|
+
* The standard list page token.
|
691
|
+
* @param {object} [options]
|
692
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
693
|
+
* @returns {Object}
|
694
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
695
|
+
* When you iterate the returned iterable, each element will be an object representing
|
696
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
697
|
+
* so you can stop the iteration when you don't need more results.
|
698
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
699
|
+
* for more details and examples.
|
700
|
+
* @example
|
701
|
+
* ```
|
702
|
+
* const iterable = client.listLocationsAsync(request);
|
703
|
+
* for await (const response of iterable) {
|
704
|
+
* // process response
|
705
|
+
* }
|
706
|
+
* ```
|
707
|
+
*/
|
845
708
|
listLocationsAsync(request, options) {
|
846
709
|
return this.locationsClient.listLocationsAsync(request, options);
|
847
710
|
}
|
848
711
|
/**
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
712
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
713
|
+
* method to poll the operation result at intervals as recommended by the API
|
714
|
+
* service.
|
715
|
+
*
|
716
|
+
* @param {Object} request - The request object that will be sent.
|
717
|
+
* @param {string} request.name - The name of the operation resource.
|
718
|
+
* @param {Object=} options
|
719
|
+
* Optional parameters. You can override the default settings for this call,
|
720
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
721
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
722
|
+
* for the details.
|
723
|
+
* @param {function(?Error, ?Object)=} callback
|
724
|
+
* The function which will be called with the result of the API call.
|
725
|
+
*
|
726
|
+
* The second parameter to the callback is an object representing
|
727
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
728
|
+
* @return {Promise} - The promise which resolves to an array.
|
729
|
+
* The first element of the array is an object representing
|
730
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
731
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
732
|
+
*
|
733
|
+
* @example
|
734
|
+
* ```
|
735
|
+
* const client = longrunning.operationsClient();
|
736
|
+
* const name = '';
|
737
|
+
* const [response] = await client.getOperation({name});
|
738
|
+
* // doThingsWith(response)
|
739
|
+
* ```
|
740
|
+
*/
|
878
741
|
getOperation(request, optionsOrCallback, callback) {
|
879
742
|
let options;
|
880
743
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1051,8 +914,7 @@ class DataStoreServiceClient {
|
|
1051
914
|
* @returns {string} A string representing the project.
|
1052
915
|
*/
|
1053
916
|
matchProjectFromCollectionName(collectionName) {
|
1054
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1055
|
-
.project;
|
917
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
|
1056
918
|
}
|
1057
919
|
/**
|
1058
920
|
* Parse the location from Collection resource.
|
@@ -1062,8 +924,7 @@ class DataStoreServiceClient {
|
|
1062
924
|
* @returns {string} A string representing the location.
|
1063
925
|
*/
|
1064
926
|
matchLocationFromCollectionName(collectionName) {
|
1065
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1066
|
-
.location;
|
927
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
|
1067
928
|
}
|
1068
929
|
/**
|
1069
930
|
* Parse the collection from Collection resource.
|
@@ -1073,8 +934,7 @@ class DataStoreServiceClient {
|
|
1073
934
|
* @returns {string} A string representing the collection.
|
1074
935
|
*/
|
1075
936
|
matchCollectionFromCollectionName(collectionName) {
|
1076
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1077
|
-
.collection;
|
937
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
|
1078
938
|
}
|
1079
939
|
/**
|
1080
940
|
* Return a fully-qualified engine resource name string.
|
@@ -1156,8 +1016,7 @@ class DataStoreServiceClient {
|
|
1156
1016
|
* @returns {string} A string representing the project.
|
1157
1017
|
*/
|
1158
1018
|
matchProjectFromEvaluationName(evaluationName) {
|
1159
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1160
|
-
.project;
|
1019
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1161
1020
|
}
|
1162
1021
|
/**
|
1163
1022
|
* Parse the location from Evaluation resource.
|
@@ -1167,8 +1026,7 @@ class DataStoreServiceClient {
|
|
1167
1026
|
* @returns {string} A string representing the location.
|
1168
1027
|
*/
|
1169
1028
|
matchLocationFromEvaluationName(evaluationName) {
|
1170
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1171
|
-
.location;
|
1029
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1172
1030
|
}
|
1173
1031
|
/**
|
1174
1032
|
* Parse the evaluation from Evaluation resource.
|
@@ -1178,8 +1036,7 @@ class DataStoreServiceClient {
|
|
1178
1036
|
* @returns {string} A string representing the evaluation.
|
1179
1037
|
*/
|
1180
1038
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1181
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1182
|
-
.evaluation;
|
1039
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1183
1040
|
}
|
1184
1041
|
/**
|
1185
1042
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3417,8 +3274,7 @@ class DataStoreServiceClient {
|
|
3417
3274
|
* @returns {string} A string representing the project.
|
3418
3275
|
*/
|
3419
3276
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3420
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3421
|
-
.project;
|
3277
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3422
3278
|
}
|
3423
3279
|
/**
|
3424
3280
|
* Parse the location from SampleQuery resource.
|
@@ -3428,8 +3284,7 @@ class DataStoreServiceClient {
|
|
3428
3284
|
* @returns {string} A string representing the location.
|
3429
3285
|
*/
|
3430
3286
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3431
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3432
|
-
.location;
|
3287
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3433
3288
|
}
|
3434
3289
|
/**
|
3435
3290
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3439,8 +3294,7 @@ class DataStoreServiceClient {
|
|
3439
3294
|
* @returns {string} A string representing the sample_query_set.
|
3440
3295
|
*/
|
3441
3296
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3442
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3443
|
-
.sample_query_set;
|
3297
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3444
3298
|
}
|
3445
3299
|
/**
|
3446
3300
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3450,8 +3304,7 @@ class DataStoreServiceClient {
|
|
3450
3304
|
* @returns {string} A string representing the sample_query.
|
3451
3305
|
*/
|
3452
3306
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3453
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3454
|
-
.sample_query;
|
3307
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3455
3308
|
}
|
3456
3309
|
/**
|
3457
3310
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3510,8 +3363,8 @@ class DataStoreServiceClient {
|
|
3510
3363
|
this._log.info('ending gRPC channel');
|
3511
3364
|
this._terminated = true;
|
3512
3365
|
stub.close();
|
3513
|
-
this.locationsClient.close();
|
3514
|
-
this.operationsClient.close();
|
3366
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3367
|
+
void this.operationsClient.close();
|
3515
3368
|
});
|
3516
3369
|
}
|
3517
3370
|
return Promise.resolve();
|