@google-cloud/discoveryengine 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5415 -578
- package/build/protos/protos.js +77830 -63391
- package/build/protos/protos.json +1537 -92
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -22
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +166 -76
- package/build/src/v1/completion_service_client.js +258 -263
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +171 -81
- package/build/src/v1/control_service_client.js +246 -132
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +233 -143
- package/build/src/v1/conversational_search_service_client.js +330 -226
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +218 -122
- package/build/src/v1/data_store_service_client.js +273 -281
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +210 -120
- package/build/src/v1/document_service_client.js +300 -301
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +193 -103
- package/build/src/v1/engine_service_client.js +273 -280
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
- package/build/src/v1/grounded_generation_service_client.js +217 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +166 -76
- package/build/src/v1/project_service_client.js +235 -223
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +137 -47
- package/build/src/v1/rank_service_client.js +204 -85
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +137 -47
- package/build/src/v1/recommendation_service_client.js +202 -82
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +201 -111
- package/build/src/v1/schema_service_client.js +264 -274
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +661 -571
- package/build/src/v1/search_service_client.js +216 -113
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +167 -77
- package/build/src/v1/search_tuning_service_client.js +246 -236
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +138 -48
- package/build/src/v1/serving_config_service_client.js +201 -80
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
- package/build/src/v1/site_search_engine_service_client.js +324 -379
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +167 -77
- package/build/src/v1/user_event_service_client.js +260 -254
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +94 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +98 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +141 -281
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +129 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +211 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +176 -317
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +193 -329
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +180 -326
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +150 -296
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +139 -263
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +87 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +85 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +169 -302
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +147 -293
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +129 -254
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +109 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +143 -272
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +149 -280
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +127 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +209 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +154 -289
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +181 -310
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +178 -316
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +148 -286
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +98 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +116 -232
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +85 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +83 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +167 -292
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +128 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +145 -283
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +127 -244
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +107 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +205 -387
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +141 -262
- package/package.json +7 -7
- package/CHANGELOG.md +0 -267
@@ -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,136 +207,31 @@ 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
|
-
const protoFilesRoot = this._gaxModule.
|
212
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
219
213
|
// This API contains "long-running operations", which return a
|
220
214
|
// an Operation object that allows for tracking of the operation,
|
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,11 +369,16 @@ 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];
|
376
|
+
}).catch((error) => {
|
377
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
378
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
379
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
380
|
+
}
|
381
|
+
throw error;
|
500
382
|
});
|
501
383
|
}
|
502
384
|
updateDataStore(request, optionsOrCallback, callback) {
|
@@ -512,13 +394,10 @@ class DataStoreServiceClient {
|
|
512
394
|
options = options || {};
|
513
395
|
options.otherArgs = options.otherArgs || {};
|
514
396
|
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;
|
397
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
398
|
+
'data_store.name': request.dataStore.name ?? '',
|
521
399
|
});
|
400
|
+
this.initialize().catch(err => { throw err; });
|
522
401
|
this._log.info('updateDataStore request %j', request);
|
523
402
|
const wrappedCallback = callback
|
524
403
|
? (error, response, options, rawResponse) => {
|
@@ -526,11 +405,16 @@ class DataStoreServiceClient {
|
|
526
405
|
callback(error, response, options, rawResponse); // We verified callback above.
|
527
406
|
}
|
528
407
|
: undefined;
|
529
|
-
return this.innerApiCalls
|
530
|
-
.updateDataStore(request, options, wrappedCallback)
|
408
|
+
return this.innerApiCalls.updateDataStore(request, options, wrappedCallback)
|
531
409
|
?.then(([response, options, rawResponse]) => {
|
532
410
|
this._log.info('updateDataStore response %j', response);
|
533
411
|
return [response, options, rawResponse];
|
412
|
+
}).catch((error) => {
|
413
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
414
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
415
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
416
|
+
}
|
417
|
+
throw error;
|
534
418
|
});
|
535
419
|
}
|
536
420
|
getDocumentProcessingConfig(request, optionsOrCallback, callback) {
|
@@ -546,13 +430,10 @@ class DataStoreServiceClient {
|
|
546
430
|
options = options || {};
|
547
431
|
options.otherArgs = options.otherArgs || {};
|
548
432
|
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;
|
433
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
434
|
+
'name': request.name ?? '',
|
555
435
|
});
|
436
|
+
this.initialize().catch(err => { throw err; });
|
556
437
|
this._log.info('getDocumentProcessingConfig request %j', request);
|
557
438
|
const wrappedCallback = callback
|
558
439
|
? (error, response, options, rawResponse) => {
|
@@ -560,11 +441,16 @@ class DataStoreServiceClient {
|
|
560
441
|
callback(error, response, options, rawResponse); // We verified callback above.
|
561
442
|
}
|
562
443
|
: undefined;
|
563
|
-
return this.innerApiCalls
|
564
|
-
.getDocumentProcessingConfig(request, options, wrappedCallback)
|
444
|
+
return this.innerApiCalls.getDocumentProcessingConfig(request, options, wrappedCallback)
|
565
445
|
?.then(([response, options, rawResponse]) => {
|
566
446
|
this._log.info('getDocumentProcessingConfig response %j', response);
|
567
447
|
return [response, options, rawResponse];
|
448
|
+
}).catch((error) => {
|
449
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
450
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
451
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
452
|
+
}
|
453
|
+
throw error;
|
568
454
|
});
|
569
455
|
}
|
570
456
|
updateDocumentProcessingConfig(request, optionsOrCallback, callback) {
|
@@ -580,13 +466,10 @@ class DataStoreServiceClient {
|
|
580
466
|
options = options || {};
|
581
467
|
options.otherArgs = options.otherArgs || {};
|
582
468
|
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;
|
469
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
470
|
+
'document_processing_config.name': request.documentProcessingConfig.name ?? '',
|
589
471
|
});
|
472
|
+
this.initialize().catch(err => { throw err; });
|
590
473
|
this._log.info('updateDocumentProcessingConfig request %j', request);
|
591
474
|
const wrappedCallback = callback
|
592
475
|
? (error, response, options, rawResponse) => {
|
@@ -594,11 +477,16 @@ class DataStoreServiceClient {
|
|
594
477
|
callback(error, response, options, rawResponse); // We verified callback above.
|
595
478
|
}
|
596
479
|
: undefined;
|
597
|
-
return this.innerApiCalls
|
598
|
-
.updateDocumentProcessingConfig(request, options, wrappedCallback)
|
480
|
+
return this.innerApiCalls.updateDocumentProcessingConfig(request, options, wrappedCallback)
|
599
481
|
?.then(([response, options, rawResponse]) => {
|
600
482
|
this._log.info('updateDocumentProcessingConfig response %j', response);
|
601
483
|
return [response, options, rawResponse];
|
484
|
+
}).catch((error) => {
|
485
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
486
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
487
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
488
|
+
}
|
489
|
+
throw error;
|
602
490
|
});
|
603
491
|
}
|
604
492
|
createDataStore(request, optionsOrCallback, callback) {
|
@@ -614,13 +502,10 @@ class DataStoreServiceClient {
|
|
614
502
|
options = options || {};
|
615
503
|
options.otherArgs = options.otherArgs || {};
|
616
504
|
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;
|
505
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
506
|
+
'parent': request.parent ?? '',
|
623
507
|
});
|
508
|
+
this.initialize().catch(err => { throw err; });
|
624
509
|
const wrappedCallback = callback
|
625
510
|
? (error, response, rawResponse, _) => {
|
626
511
|
this._log.info('createDataStore response %j', rawResponse);
|
@@ -628,8 +513,7 @@ class DataStoreServiceClient {
|
|
628
513
|
}
|
629
514
|
: undefined;
|
630
515
|
this._log.info('createDataStore request %j', request);
|
631
|
-
return this.innerApiCalls
|
632
|
-
.createDataStore(request, options, wrappedCallback)
|
516
|
+
return this.innerApiCalls.createDataStore(request, options, wrappedCallback)
|
633
517
|
?.then(([response, rawResponse, _]) => {
|
634
518
|
this._log.info('createDataStore response %j', rawResponse);
|
635
519
|
return [response, rawResponse, _];
|
@@ -666,13 +550,10 @@ class DataStoreServiceClient {
|
|
666
550
|
options = options || {};
|
667
551
|
options.otherArgs = options.otherArgs || {};
|
668
552
|
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;
|
553
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
554
|
+
'name': request.name ?? '',
|
675
555
|
});
|
556
|
+
this.initialize().catch(err => { throw err; });
|
676
557
|
const wrappedCallback = callback
|
677
558
|
? (error, response, rawResponse, _) => {
|
678
559
|
this._log.info('deleteDataStore response %j', rawResponse);
|
@@ -680,8 +561,7 @@ class DataStoreServiceClient {
|
|
680
561
|
}
|
681
562
|
: undefined;
|
682
563
|
this._log.info('deleteDataStore request %j', request);
|
683
|
-
return this.innerApiCalls
|
684
|
-
.deleteDataStore(request, options, wrappedCallback)
|
564
|
+
return this.innerApiCalls.deleteDataStore(request, options, wrappedCallback)
|
685
565
|
?.then(([response, rawResponse, _]) => {
|
686
566
|
this._log.info('deleteDataStore response %j', rawResponse);
|
687
567
|
return [response, rawResponse, _];
|
@@ -718,13 +598,10 @@ class DataStoreServiceClient {
|
|
718
598
|
options = options || {};
|
719
599
|
options.otherArgs = options.otherArgs || {};
|
720
600
|
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;
|
601
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
602
|
+
'parent': request.parent ?? '',
|
727
603
|
});
|
604
|
+
this.initialize().catch(err => { throw err; });
|
728
605
|
const wrappedCallback = callback
|
729
606
|
? (error, values, nextPageRequest, rawResponse) => {
|
730
607
|
this._log.info('listDataStores values %j', values);
|
@@ -788,15 +665,12 @@ class DataStoreServiceClient {
|
|
788
665
|
options = options || {};
|
789
666
|
options.otherArgs = options.otherArgs || {};
|
790
667
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
791
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
792
|
-
|
793
|
-
|
794
|
-
});
|
668
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
669
|
+
'parent': request.parent ?? '',
|
670
|
+
});
|
795
671
|
const defaultCallSettings = this._defaults['listDataStores'];
|
796
672
|
const callSettings = defaultCallSettings.merge(options);
|
797
|
-
this.initialize().catch(err => {
|
798
|
-
throw err;
|
799
|
-
});
|
673
|
+
this.initialize().catch(err => { throw err; });
|
800
674
|
this._log.info('listDataStores stream %j', request);
|
801
675
|
return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
|
802
676
|
}
|
@@ -852,103 +726,100 @@ class DataStoreServiceClient {
|
|
852
726
|
options = options || {};
|
853
727
|
options.otherArgs = options.otherArgs || {};
|
854
728
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
855
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
856
|
-
|
857
|
-
|
858
|
-
});
|
729
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
730
|
+
'parent': request.parent ?? '',
|
731
|
+
});
|
859
732
|
const defaultCallSettings = this._defaults['listDataStores'];
|
860
733
|
const callSettings = defaultCallSettings.merge(options);
|
861
|
-
this.initialize().catch(err => {
|
862
|
-
throw err;
|
863
|
-
});
|
734
|
+
this.initialize().catch(err => { throw err; });
|
864
735
|
this._log.info('listDataStores iterate %j', request);
|
865
736
|
return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
|
866
737
|
}
|
867
738
|
/**
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
739
|
+
* Gets information about a location.
|
740
|
+
*
|
741
|
+
* @param {Object} request
|
742
|
+
* The request object that will be sent.
|
743
|
+
* @param {string} request.name
|
744
|
+
* Resource name for the location.
|
745
|
+
* @param {object} [options]
|
746
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
747
|
+
* @returns {Promise} - The promise which resolves to an array.
|
748
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
749
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
750
|
+
* for more details and examples.
|
751
|
+
* @example
|
752
|
+
* ```
|
753
|
+
* const [response] = await client.getLocation(request);
|
754
|
+
* ```
|
755
|
+
*/
|
885
756
|
getLocation(request, options, callback) {
|
886
757
|
return this.locationsClient.getLocation(request, options, callback);
|
887
758
|
}
|
888
759
|
/**
|
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
|
-
|
760
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
761
|
+
*
|
762
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
763
|
+
* @param {Object} request
|
764
|
+
* The request object that will be sent.
|
765
|
+
* @param {string} request.name
|
766
|
+
* The resource that owns the locations collection, if applicable.
|
767
|
+
* @param {string} request.filter
|
768
|
+
* The standard list filter.
|
769
|
+
* @param {number} request.pageSize
|
770
|
+
* The standard list page size.
|
771
|
+
* @param {string} request.pageToken
|
772
|
+
* The standard list page token.
|
773
|
+
* @param {object} [options]
|
774
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
775
|
+
* @returns {Object}
|
776
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
777
|
+
* When you iterate the returned iterable, each element will be an object representing
|
778
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
779
|
+
* so you can stop the iteration when you don't need more results.
|
780
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
781
|
+
* for more details and examples.
|
782
|
+
* @example
|
783
|
+
* ```
|
784
|
+
* const iterable = client.listLocationsAsync(request);
|
785
|
+
* for await (const response of iterable) {
|
786
|
+
* // process response
|
787
|
+
* }
|
788
|
+
* ```
|
789
|
+
*/
|
919
790
|
listLocationsAsync(request, options) {
|
920
791
|
return this.locationsClient.listLocationsAsync(request, options);
|
921
792
|
}
|
922
793
|
/**
|
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
|
-
|
794
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
795
|
+
* method to poll the operation result at intervals as recommended by the API
|
796
|
+
* service.
|
797
|
+
*
|
798
|
+
* @param {Object} request - The request object that will be sent.
|
799
|
+
* @param {string} request.name - The name of the operation resource.
|
800
|
+
* @param {Object=} options
|
801
|
+
* Optional parameters. You can override the default settings for this call,
|
802
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
803
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
804
|
+
* for the details.
|
805
|
+
* @param {function(?Error, ?Object)=} callback
|
806
|
+
* The function which will be called with the result of the API call.
|
807
|
+
*
|
808
|
+
* The second parameter to the callback is an object representing
|
809
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
810
|
+
* @return {Promise} - The promise which resolves to an array.
|
811
|
+
* The first element of the array is an object representing
|
812
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
813
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
814
|
+
*
|
815
|
+
* @example
|
816
|
+
* ```
|
817
|
+
* const client = longrunning.operationsClient();
|
818
|
+
* const name = '';
|
819
|
+
* const [response] = await client.getOperation({name});
|
820
|
+
* // doThingsWith(response)
|
821
|
+
* ```
|
822
|
+
*/
|
952
823
|
getOperation(request, optionsOrCallback, callback) {
|
953
824
|
let options;
|
954
825
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1123,8 +994,7 @@ class DataStoreServiceClient {
|
|
1123
994
|
* @returns {string} A string representing the project.
|
1124
995
|
*/
|
1125
996
|
matchProjectFromAclConfigName(aclConfigName) {
|
1126
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1127
|
-
.project;
|
997
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1128
998
|
}
|
1129
999
|
/**
|
1130
1000
|
* Parse the location from AclConfig resource.
|
@@ -1134,8 +1004,7 @@ class DataStoreServiceClient {
|
|
1134
1004
|
* @returns {string} A string representing the location.
|
1135
1005
|
*/
|
1136
1006
|
matchLocationFromAclConfigName(aclConfigName) {
|
1137
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1138
|
-
.location;
|
1007
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1139
1008
|
}
|
1140
1009
|
/**
|
1141
1010
|
* Return a fully-qualified collection resource name string.
|
@@ -1160,8 +1029,7 @@ class DataStoreServiceClient {
|
|
1160
1029
|
* @returns {string} A string representing the project.
|
1161
1030
|
*/
|
1162
1031
|
matchProjectFromCollectionName(collectionName) {
|
1163
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1164
|
-
.project;
|
1032
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
|
1165
1033
|
}
|
1166
1034
|
/**
|
1167
1035
|
* Parse the location from Collection resource.
|
@@ -1171,8 +1039,7 @@ class DataStoreServiceClient {
|
|
1171
1039
|
* @returns {string} A string representing the location.
|
1172
1040
|
*/
|
1173
1041
|
matchLocationFromCollectionName(collectionName) {
|
1174
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1175
|
-
.location;
|
1042
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
|
1176
1043
|
}
|
1177
1044
|
/**
|
1178
1045
|
* Parse the collection from Collection resource.
|
@@ -1182,8 +1049,7 @@ class DataStoreServiceClient {
|
|
1182
1049
|
* @returns {string} A string representing the collection.
|
1183
1050
|
*/
|
1184
1051
|
matchCollectionFromCollectionName(collectionName) {
|
1185
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1186
|
-
.collection;
|
1052
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
|
1187
1053
|
}
|
1188
1054
|
/**
|
1189
1055
|
* Return a fully-qualified engine resource name string.
|
@@ -1265,8 +1131,7 @@ class DataStoreServiceClient {
|
|
1265
1131
|
* @returns {string} A string representing the project.
|
1266
1132
|
*/
|
1267
1133
|
matchProjectFromEvaluationName(evaluationName) {
|
1268
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1269
|
-
.project;
|
1134
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1270
1135
|
}
|
1271
1136
|
/**
|
1272
1137
|
* Parse the location from Evaluation resource.
|
@@ -1276,8 +1141,7 @@ class DataStoreServiceClient {
|
|
1276
1141
|
* @returns {string} A string representing the location.
|
1277
1142
|
*/
|
1278
1143
|
matchLocationFromEvaluationName(evaluationName) {
|
1279
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1280
|
-
.location;
|
1144
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1281
1145
|
}
|
1282
1146
|
/**
|
1283
1147
|
* Parse the evaluation from Evaluation resource.
|
@@ -1287,8 +1151,7 @@ class DataStoreServiceClient {
|
|
1287
1151
|
* @returns {string} A string representing the evaluation.
|
1288
1152
|
*/
|
1289
1153
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1290
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1291
|
-
.evaluation;
|
1154
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1292
1155
|
}
|
1293
1156
|
/**
|
1294
1157
|
* Return a fully-qualified project resource name string.
|
@@ -3355,8 +3218,7 @@ class DataStoreServiceClient {
|
|
3355
3218
|
* @returns {string} A string representing the project.
|
3356
3219
|
*/
|
3357
3220
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3358
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3359
|
-
.project;
|
3221
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3360
3222
|
}
|
3361
3223
|
/**
|
3362
3224
|
* Parse the location from SampleQuery resource.
|
@@ -3366,8 +3228,7 @@ class DataStoreServiceClient {
|
|
3366
3228
|
* @returns {string} A string representing the location.
|
3367
3229
|
*/
|
3368
3230
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3369
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3370
|
-
.location;
|
3231
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3371
3232
|
}
|
3372
3233
|
/**
|
3373
3234
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3377,8 +3238,7 @@ class DataStoreServiceClient {
|
|
3377
3238
|
* @returns {string} A string representing the sample_query_set.
|
3378
3239
|
*/
|
3379
3240
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3380
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3381
|
-
.sample_query_set;
|
3241
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3382
3242
|
}
|
3383
3243
|
/**
|
3384
3244
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3388,8 +3248,7 @@ class DataStoreServiceClient {
|
|
3388
3248
|
* @returns {string} A string representing the sample_query.
|
3389
3249
|
*/
|
3390
3250
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3391
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3392
|
-
.sample_query;
|
3251
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3393
3252
|
}
|
3394
3253
|
/**
|
3395
3254
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3448,8 +3307,8 @@ class DataStoreServiceClient {
|
|
3448
3307
|
this._log.info('ending gRPC channel');
|
3449
3308
|
this._terminated = true;
|
3450
3309
|
stub.close();
|
3451
|
-
this.locationsClient.close();
|
3452
|
-
this.operationsClient.close();
|
3310
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3311
|
+
void this.operationsClient.close();
|
3453
3312
|
});
|
3454
3313
|
}
|
3455
3314
|
return Promise.resolve();
|