@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
|
}
|
@@ -213,7 +207,7 @@ class DataStoreServiceClient {
|
|
213
207
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
214
208
|
// pages). Denote the keys used for pagination and results.
|
215
209
|
this.descriptors.page = {
|
216
|
-
listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
|
210
|
+
listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
|
217
211
|
};
|
218
212
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
219
213
|
// This API contains "long-running operations", which return a
|
@@ -221,128 +215,23 @@ class DataStoreServiceClient {
|
|
221
215
|
// rather than holding a request open.
|
222
216
|
const lroOptions = {
|
223
217
|
auth: this.auth,
|
224
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
218
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
225
219
|
};
|
226
220
|
if (opts.fallback) {
|
227
221
|
lroOptions.protoJson = protoFilesRoot;
|
228
|
-
lroOptions.httpRules = [
|
229
|
-
{
|
230
|
-
|
231
|
-
|
232
|
-
body: '*',
|
233
|
-
additional_bindings: [
|
234
|
-
{
|
235
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
236
|
-
body: '*',
|
237
|
-
},
|
238
|
-
],
|
239
|
-
},
|
240
|
-
{
|
241
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
242
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
243
|
-
additional_bindings: [
|
244
|
-
{
|
245
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
246
|
-
},
|
247
|
-
{
|
248
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
249
|
-
},
|
250
|
-
{
|
251
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
252
|
-
},
|
253
|
-
{
|
254
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
255
|
-
},
|
256
|
-
{
|
257
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
258
|
-
},
|
259
|
-
{
|
260
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
261
|
-
},
|
262
|
-
{
|
263
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
267
|
-
},
|
268
|
-
{
|
269
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
270
|
-
},
|
271
|
-
{
|
272
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
273
|
-
},
|
274
|
-
{
|
275
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
276
|
-
},
|
277
|
-
{
|
278
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
279
|
-
},
|
280
|
-
{
|
281
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
282
|
-
},
|
283
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
284
|
-
{
|
285
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
286
|
-
},
|
287
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
288
|
-
],
|
289
|
-
},
|
290
|
-
{
|
291
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
292
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
293
|
-
additional_bindings: [
|
294
|
-
{
|
295
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
296
|
-
},
|
297
|
-
{
|
298
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
302
|
-
},
|
303
|
-
{
|
304
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
308
|
-
},
|
309
|
-
{
|
310
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
311
|
-
},
|
312
|
-
{
|
313
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
314
|
-
},
|
315
|
-
{
|
316
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
317
|
-
},
|
318
|
-
{
|
319
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
320
|
-
},
|
321
|
-
{
|
322
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
323
|
-
},
|
324
|
-
{
|
325
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
326
|
-
},
|
327
|
-
{
|
328
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
329
|
-
},
|
330
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
331
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
332
|
-
],
|
333
|
-
},
|
334
|
-
];
|
222
|
+
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: '*', }],
|
223
|
+
}, { 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/*}', }],
|
224
|
+
}, { 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', }],
|
225
|
+
}];
|
335
226
|
}
|
336
|
-
this.operationsClient = this._gaxModule
|
337
|
-
.lro(lroOptions)
|
338
|
-
.operationsClient(opts);
|
227
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
339
228
|
const createDataStoreResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DataStore');
|
340
229
|
const createDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateDataStoreMetadata');
|
341
230
|
const deleteDataStoreResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
|
342
231
|
const deleteDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DeleteDataStoreMetadata');
|
343
232
|
this.descriptors.longrunning = {
|
344
233
|
createDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createDataStoreResponse.decode.bind(createDataStoreResponse), createDataStoreMetadata.decode.bind(createDataStoreMetadata)),
|
345
|
-
deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
|
234
|
+
deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
|
346
235
|
};
|
347
236
|
// Put together the default options sent with requests.
|
348
237
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.DataStoreService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -371,22 +260,13 @@ class DataStoreServiceClient {
|
|
371
260
|
}
|
372
261
|
// Put together the "service stub" for
|
373
262
|
// google.cloud.discoveryengine.v1alpha.DataStoreService.
|
374
|
-
this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
.DataStoreService, this._opts, this._providedCustomServicePath);
|
263
|
+
this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
264
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.DataStoreService') :
|
265
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
266
|
+
this._protos.google.cloud.discoveryengine.v1alpha.DataStoreService, this._opts, this._providedCustomServicePath);
|
379
267
|
// Iterate over each of the methods that the service provides
|
380
268
|
// and create an API call method for each.
|
381
|
-
const dataStoreServiceStubMethods = [
|
382
|
-
'createDataStore',
|
383
|
-
'getDataStore',
|
384
|
-
'listDataStores',
|
385
|
-
'deleteDataStore',
|
386
|
-
'updateDataStore',
|
387
|
-
'getDocumentProcessingConfig',
|
388
|
-
'updateDocumentProcessingConfig',
|
389
|
-
];
|
269
|
+
const dataStoreServiceStubMethods = ['createDataStore', 'getDataStore', 'listDataStores', 'deleteDataStore', 'updateDataStore', 'getDocumentProcessingConfig', 'updateDocumentProcessingConfig'];
|
390
270
|
for (const methodName of dataStoreServiceStubMethods) {
|
391
271
|
const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
|
392
272
|
if (this._terminated) {
|
@@ -411,8 +291,7 @@ class DataStoreServiceClient {
|
|
411
291
|
* @returns {string} The DNS address for this service.
|
412
292
|
*/
|
413
293
|
static get servicePath() {
|
414
|
-
if (typeof process === 'object' &&
|
415
|
-
typeof process.emitWarning === 'function') {
|
294
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
416
295
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
417
296
|
}
|
418
297
|
return 'discoveryengine.googleapis.com';
|
@@ -423,8 +302,7 @@ class DataStoreServiceClient {
|
|
423
302
|
* @returns {string} The DNS address for this service.
|
424
303
|
*/
|
425
304
|
static get apiEndpoint() {
|
426
|
-
if (typeof process === 'object' &&
|
427
|
-
typeof process.emitWarning === 'function') {
|
305
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
428
306
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
429
307
|
}
|
430
308
|
return 'discoveryengine.googleapis.com';
|
@@ -452,7 +330,9 @@ class DataStoreServiceClient {
|
|
452
330
|
* @returns {string[]} List of default scopes.
|
453
331
|
*/
|
454
332
|
static get scopes() {
|
455
|
-
return [
|
333
|
+
return [
|
334
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
335
|
+
];
|
456
336
|
}
|
457
337
|
/**
|
458
338
|
* Return the project ID used by this class.
|
@@ -478,13 +358,10 @@ class DataStoreServiceClient {
|
|
478
358
|
options = options || {};
|
479
359
|
options.otherArgs = options.otherArgs || {};
|
480
360
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
481
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
482
|
-
|
483
|
-
name: request.name ?? '',
|
484
|
-
});
|
485
|
-
this.initialize().catch(err => {
|
486
|
-
throw err;
|
361
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
362
|
+
'name': request.name ?? '',
|
487
363
|
});
|
364
|
+
this.initialize().catch(err => { throw err; });
|
488
365
|
this._log.info('getDataStore request %j', request);
|
489
366
|
const wrappedCallback = callback
|
490
367
|
? (error, response, options, rawResponse) => {
|
@@ -492,8 +369,7 @@ class DataStoreServiceClient {
|
|
492
369
|
callback(error, response, options, rawResponse); // We verified callback above.
|
493
370
|
}
|
494
371
|
: undefined;
|
495
|
-
return this.innerApiCalls
|
496
|
-
.getDataStore(request, options, wrappedCallback)
|
372
|
+
return this.innerApiCalls.getDataStore(request, options, wrappedCallback)
|
497
373
|
?.then(([response, options, rawResponse]) => {
|
498
374
|
this._log.info('getDataStore response %j', response);
|
499
375
|
return [response, options, rawResponse];
|
@@ -512,13 +388,10 @@ class DataStoreServiceClient {
|
|
512
388
|
options = options || {};
|
513
389
|
options.otherArgs = options.otherArgs || {};
|
514
390
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
515
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
516
|
-
|
517
|
-
'data_store.name': request.dataStore.name ?? '',
|
518
|
-
});
|
519
|
-
this.initialize().catch(err => {
|
520
|
-
throw err;
|
391
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
392
|
+
'data_store.name': request.dataStore.name ?? '',
|
521
393
|
});
|
394
|
+
this.initialize().catch(err => { throw err; });
|
522
395
|
this._log.info('updateDataStore request %j', request);
|
523
396
|
const wrappedCallback = callback
|
524
397
|
? (error, response, options, rawResponse) => {
|
@@ -526,8 +399,7 @@ class DataStoreServiceClient {
|
|
526
399
|
callback(error, response, options, rawResponse); // We verified callback above.
|
527
400
|
}
|
528
401
|
: undefined;
|
529
|
-
return this.innerApiCalls
|
530
|
-
.updateDataStore(request, options, wrappedCallback)
|
402
|
+
return this.innerApiCalls.updateDataStore(request, options, wrappedCallback)
|
531
403
|
?.then(([response, options, rawResponse]) => {
|
532
404
|
this._log.info('updateDataStore response %j', response);
|
533
405
|
return [response, options, rawResponse];
|
@@ -546,13 +418,10 @@ class DataStoreServiceClient {
|
|
546
418
|
options = options || {};
|
547
419
|
options.otherArgs = options.otherArgs || {};
|
548
420
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
549
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
550
|
-
|
551
|
-
name: request.name ?? '',
|
552
|
-
});
|
553
|
-
this.initialize().catch(err => {
|
554
|
-
throw err;
|
421
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
422
|
+
'name': request.name ?? '',
|
555
423
|
});
|
424
|
+
this.initialize().catch(err => { throw err; });
|
556
425
|
this._log.info('getDocumentProcessingConfig request %j', request);
|
557
426
|
const wrappedCallback = callback
|
558
427
|
? (error, response, options, rawResponse) => {
|
@@ -560,8 +429,7 @@ class DataStoreServiceClient {
|
|
560
429
|
callback(error, response, options, rawResponse); // We verified callback above.
|
561
430
|
}
|
562
431
|
: undefined;
|
563
|
-
return this.innerApiCalls
|
564
|
-
.getDocumentProcessingConfig(request, options, wrappedCallback)
|
432
|
+
return this.innerApiCalls.getDocumentProcessingConfig(request, options, wrappedCallback)
|
565
433
|
?.then(([response, options, rawResponse]) => {
|
566
434
|
this._log.info('getDocumentProcessingConfig response %j', response);
|
567
435
|
return [response, options, rawResponse];
|
@@ -580,13 +448,10 @@ class DataStoreServiceClient {
|
|
580
448
|
options = options || {};
|
581
449
|
options.otherArgs = options.otherArgs || {};
|
582
450
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
583
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
584
|
-
|
585
|
-
'document_processing_config.name': request.documentProcessingConfig.name ?? '',
|
586
|
-
});
|
587
|
-
this.initialize().catch(err => {
|
588
|
-
throw err;
|
451
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
452
|
+
'document_processing_config.name': request.documentProcessingConfig.name ?? '',
|
589
453
|
});
|
454
|
+
this.initialize().catch(err => { throw err; });
|
590
455
|
this._log.info('updateDocumentProcessingConfig request %j', request);
|
591
456
|
const wrappedCallback = callback
|
592
457
|
? (error, response, options, rawResponse) => {
|
@@ -594,8 +459,7 @@ class DataStoreServiceClient {
|
|
594
459
|
callback(error, response, options, rawResponse); // We verified callback above.
|
595
460
|
}
|
596
461
|
: undefined;
|
597
|
-
return this.innerApiCalls
|
598
|
-
.updateDocumentProcessingConfig(request, options, wrappedCallback)
|
462
|
+
return this.innerApiCalls.updateDocumentProcessingConfig(request, options, wrappedCallback)
|
599
463
|
?.then(([response, options, rawResponse]) => {
|
600
464
|
this._log.info('updateDocumentProcessingConfig response %j', response);
|
601
465
|
return [response, options, rawResponse];
|
@@ -614,13 +478,10 @@ class DataStoreServiceClient {
|
|
614
478
|
options = options || {};
|
615
479
|
options.otherArgs = options.otherArgs || {};
|
616
480
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
617
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
618
|
-
|
619
|
-
parent: request.parent ?? '',
|
620
|
-
});
|
621
|
-
this.initialize().catch(err => {
|
622
|
-
throw err;
|
481
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
482
|
+
'parent': request.parent ?? '',
|
623
483
|
});
|
484
|
+
this.initialize().catch(err => { throw err; });
|
624
485
|
const wrappedCallback = callback
|
625
486
|
? (error, response, rawResponse, _) => {
|
626
487
|
this._log.info('createDataStore response %j', rawResponse);
|
@@ -628,8 +489,7 @@ class DataStoreServiceClient {
|
|
628
489
|
}
|
629
490
|
: undefined;
|
630
491
|
this._log.info('createDataStore request %j', request);
|
631
|
-
return this.innerApiCalls
|
632
|
-
.createDataStore(request, options, wrappedCallback)
|
492
|
+
return this.innerApiCalls.createDataStore(request, options, wrappedCallback)
|
633
493
|
?.then(([response, rawResponse, _]) => {
|
634
494
|
this._log.info('createDataStore response %j', rawResponse);
|
635
495
|
return [response, rawResponse, _];
|
@@ -666,13 +526,10 @@ class DataStoreServiceClient {
|
|
666
526
|
options = options || {};
|
667
527
|
options.otherArgs = options.otherArgs || {};
|
668
528
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
669
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
670
|
-
|
671
|
-
name: request.name ?? '',
|
672
|
-
});
|
673
|
-
this.initialize().catch(err => {
|
674
|
-
throw err;
|
529
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
530
|
+
'name': request.name ?? '',
|
675
531
|
});
|
532
|
+
this.initialize().catch(err => { throw err; });
|
676
533
|
const wrappedCallback = callback
|
677
534
|
? (error, response, rawResponse, _) => {
|
678
535
|
this._log.info('deleteDataStore response %j', rawResponse);
|
@@ -680,8 +537,7 @@ class DataStoreServiceClient {
|
|
680
537
|
}
|
681
538
|
: undefined;
|
682
539
|
this._log.info('deleteDataStore request %j', request);
|
683
|
-
return this.innerApiCalls
|
684
|
-
.deleteDataStore(request, options, wrappedCallback)
|
540
|
+
return this.innerApiCalls.deleteDataStore(request, options, wrappedCallback)
|
685
541
|
?.then(([response, rawResponse, _]) => {
|
686
542
|
this._log.info('deleteDataStore response %j', rawResponse);
|
687
543
|
return [response, rawResponse, _];
|
@@ -718,13 +574,10 @@ class DataStoreServiceClient {
|
|
718
574
|
options = options || {};
|
719
575
|
options.otherArgs = options.otherArgs || {};
|
720
576
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
721
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
722
|
-
|
723
|
-
parent: request.parent ?? '',
|
724
|
-
});
|
725
|
-
this.initialize().catch(err => {
|
726
|
-
throw err;
|
577
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
578
|
+
'parent': request.parent ?? '',
|
727
579
|
});
|
580
|
+
this.initialize().catch(err => { throw err; });
|
728
581
|
const wrappedCallback = callback
|
729
582
|
? (error, values, nextPageRequest, rawResponse) => {
|
730
583
|
this._log.info('listDataStores values %j', values);
|
@@ -788,15 +641,12 @@ class DataStoreServiceClient {
|
|
788
641
|
options = options || {};
|
789
642
|
options.otherArgs = options.otherArgs || {};
|
790
643
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
791
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
792
|
-
|
793
|
-
|
794
|
-
});
|
644
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
645
|
+
'parent': request.parent ?? '',
|
646
|
+
});
|
795
647
|
const defaultCallSettings = this._defaults['listDataStores'];
|
796
648
|
const callSettings = defaultCallSettings.merge(options);
|
797
|
-
this.initialize().catch(err => {
|
798
|
-
throw err;
|
799
|
-
});
|
649
|
+
this.initialize().catch(err => { throw err; });
|
800
650
|
this._log.info('listDataStores stream %j', request);
|
801
651
|
return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
|
802
652
|
}
|
@@ -852,103 +702,100 @@ class DataStoreServiceClient {
|
|
852
702
|
options = options || {};
|
853
703
|
options.otherArgs = options.otherArgs || {};
|
854
704
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
855
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
856
|
-
|
857
|
-
|
858
|
-
});
|
705
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
706
|
+
'parent': request.parent ?? '',
|
707
|
+
});
|
859
708
|
const defaultCallSettings = this._defaults['listDataStores'];
|
860
709
|
const callSettings = defaultCallSettings.merge(options);
|
861
|
-
this.initialize().catch(err => {
|
862
|
-
throw err;
|
863
|
-
});
|
710
|
+
this.initialize().catch(err => { throw err; });
|
864
711
|
this._log.info('listDataStores iterate %j', request);
|
865
712
|
return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
|
866
713
|
}
|
867
714
|
/**
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
715
|
+
* Gets information about a location.
|
716
|
+
*
|
717
|
+
* @param {Object} request
|
718
|
+
* The request object that will be sent.
|
719
|
+
* @param {string} request.name
|
720
|
+
* Resource name for the location.
|
721
|
+
* @param {object} [options]
|
722
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
723
|
+
* @returns {Promise} - The promise which resolves to an array.
|
724
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
725
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
726
|
+
* for more details and examples.
|
727
|
+
* @example
|
728
|
+
* ```
|
729
|
+
* const [response] = await client.getLocation(request);
|
730
|
+
* ```
|
731
|
+
*/
|
885
732
|
getLocation(request, options, callback) {
|
886
733
|
return this.locationsClient.getLocation(request, options, callback);
|
887
734
|
}
|
888
735
|
/**
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
736
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
737
|
+
*
|
738
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
739
|
+
* @param {Object} request
|
740
|
+
* The request object that will be sent.
|
741
|
+
* @param {string} request.name
|
742
|
+
* The resource that owns the locations collection, if applicable.
|
743
|
+
* @param {string} request.filter
|
744
|
+
* The standard list filter.
|
745
|
+
* @param {number} request.pageSize
|
746
|
+
* The standard list page size.
|
747
|
+
* @param {string} request.pageToken
|
748
|
+
* The standard list page token.
|
749
|
+
* @param {object} [options]
|
750
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
751
|
+
* @returns {Object}
|
752
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
753
|
+
* When you iterate the returned iterable, each element will be an object representing
|
754
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
755
|
+
* so you can stop the iteration when you don't need more results.
|
756
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
757
|
+
* for more details and examples.
|
758
|
+
* @example
|
759
|
+
* ```
|
760
|
+
* const iterable = client.listLocationsAsync(request);
|
761
|
+
* for await (const response of iterable) {
|
762
|
+
* // process response
|
763
|
+
* }
|
764
|
+
* ```
|
765
|
+
*/
|
919
766
|
listLocationsAsync(request, options) {
|
920
767
|
return this.locationsClient.listLocationsAsync(request, options);
|
921
768
|
}
|
922
769
|
/**
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
770
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
771
|
+
* method to poll the operation result at intervals as recommended by the API
|
772
|
+
* service.
|
773
|
+
*
|
774
|
+
* @param {Object} request - The request object that will be sent.
|
775
|
+
* @param {string} request.name - The name of the operation resource.
|
776
|
+
* @param {Object=} options
|
777
|
+
* Optional parameters. You can override the default settings for this call,
|
778
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
779
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
780
|
+
* for the details.
|
781
|
+
* @param {function(?Error, ?Object)=} callback
|
782
|
+
* The function which will be called with the result of the API call.
|
783
|
+
*
|
784
|
+
* The second parameter to the callback is an object representing
|
785
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
786
|
+
* @return {Promise} - The promise which resolves to an array.
|
787
|
+
* The first element of the array is an object representing
|
788
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
789
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
790
|
+
*
|
791
|
+
* @example
|
792
|
+
* ```
|
793
|
+
* const client = longrunning.operationsClient();
|
794
|
+
* const name = '';
|
795
|
+
* const [response] = await client.getOperation({name});
|
796
|
+
* // doThingsWith(response)
|
797
|
+
* ```
|
798
|
+
*/
|
952
799
|
getOperation(request, optionsOrCallback, callback) {
|
953
800
|
let options;
|
954
801
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1123,8 +970,7 @@ class DataStoreServiceClient {
|
|
1123
970
|
* @returns {string} A string representing the project.
|
1124
971
|
*/
|
1125
972
|
matchProjectFromAclConfigName(aclConfigName) {
|
1126
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1127
|
-
.project;
|
973
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1128
974
|
}
|
1129
975
|
/**
|
1130
976
|
* Parse the location from AclConfig resource.
|
@@ -1134,8 +980,7 @@ class DataStoreServiceClient {
|
|
1134
980
|
* @returns {string} A string representing the location.
|
1135
981
|
*/
|
1136
982
|
matchLocationFromAclConfigName(aclConfigName) {
|
1137
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1138
|
-
.location;
|
983
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1139
984
|
}
|
1140
985
|
/**
|
1141
986
|
* Return a fully-qualified collection resource name string.
|
@@ -1160,8 +1005,7 @@ class DataStoreServiceClient {
|
|
1160
1005
|
* @returns {string} A string representing the project.
|
1161
1006
|
*/
|
1162
1007
|
matchProjectFromCollectionName(collectionName) {
|
1163
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1164
|
-
.project;
|
1008
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
|
1165
1009
|
}
|
1166
1010
|
/**
|
1167
1011
|
* Parse the location from Collection resource.
|
@@ -1171,8 +1015,7 @@ class DataStoreServiceClient {
|
|
1171
1015
|
* @returns {string} A string representing the location.
|
1172
1016
|
*/
|
1173
1017
|
matchLocationFromCollectionName(collectionName) {
|
1174
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1175
|
-
.location;
|
1018
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
|
1176
1019
|
}
|
1177
1020
|
/**
|
1178
1021
|
* Parse the collection from Collection resource.
|
@@ -1182,8 +1025,7 @@ class DataStoreServiceClient {
|
|
1182
1025
|
* @returns {string} A string representing the collection.
|
1183
1026
|
*/
|
1184
1027
|
matchCollectionFromCollectionName(collectionName) {
|
1185
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1186
|
-
.collection;
|
1028
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
|
1187
1029
|
}
|
1188
1030
|
/**
|
1189
1031
|
* Return a fully-qualified engine resource name string.
|
@@ -1265,8 +1107,7 @@ class DataStoreServiceClient {
|
|
1265
1107
|
* @returns {string} A string representing the project.
|
1266
1108
|
*/
|
1267
1109
|
matchProjectFromEvaluationName(evaluationName) {
|
1268
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1269
|
-
.project;
|
1110
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1270
1111
|
}
|
1271
1112
|
/**
|
1272
1113
|
* Parse the location from Evaluation resource.
|
@@ -1276,8 +1117,7 @@ class DataStoreServiceClient {
|
|
1276
1117
|
* @returns {string} A string representing the location.
|
1277
1118
|
*/
|
1278
1119
|
matchLocationFromEvaluationName(evaluationName) {
|
1279
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1280
|
-
.location;
|
1120
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1281
1121
|
}
|
1282
1122
|
/**
|
1283
1123
|
* Parse the evaluation from Evaluation resource.
|
@@ -1287,8 +1127,7 @@ class DataStoreServiceClient {
|
|
1287
1127
|
* @returns {string} A string representing the evaluation.
|
1288
1128
|
*/
|
1289
1129
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1290
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1291
|
-
.evaluation;
|
1130
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1292
1131
|
}
|
1293
1132
|
/**
|
1294
1133
|
* Return a fully-qualified project resource name string.
|
@@ -3355,8 +3194,7 @@ class DataStoreServiceClient {
|
|
3355
3194
|
* @returns {string} A string representing the project.
|
3356
3195
|
*/
|
3357
3196
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3358
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3359
|
-
.project;
|
3197
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3360
3198
|
}
|
3361
3199
|
/**
|
3362
3200
|
* Parse the location from SampleQuery resource.
|
@@ -3366,8 +3204,7 @@ class DataStoreServiceClient {
|
|
3366
3204
|
* @returns {string} A string representing the location.
|
3367
3205
|
*/
|
3368
3206
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3369
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3370
|
-
.location;
|
3207
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3371
3208
|
}
|
3372
3209
|
/**
|
3373
3210
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3377,8 +3214,7 @@ class DataStoreServiceClient {
|
|
3377
3214
|
* @returns {string} A string representing the sample_query_set.
|
3378
3215
|
*/
|
3379
3216
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3380
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3381
|
-
.sample_query_set;
|
3217
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3382
3218
|
}
|
3383
3219
|
/**
|
3384
3220
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3388,8 +3224,7 @@ class DataStoreServiceClient {
|
|
3388
3224
|
* @returns {string} A string representing the sample_query.
|
3389
3225
|
*/
|
3390
3226
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3391
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3392
|
-
.sample_query;
|
3227
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3393
3228
|
}
|
3394
3229
|
/**
|
3395
3230
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3448,8 +3283,8 @@ class DataStoreServiceClient {
|
|
3448
3283
|
this._log.info('ending gRPC channel');
|
3449
3284
|
this._terminated = true;
|
3450
3285
|
stub.close();
|
3451
|
-
this.locationsClient.close();
|
3452
|
-
this.operationsClient.close();
|
3286
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3287
|
+
void this.operationsClient.close();
|
3453
3288
|
});
|
3454
3289
|
}
|
3455
3290
|
return Promise.resolve();
|