@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 EngineServiceClient {
|
|
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 EngineServiceClient {
|
|
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,129 +207,24 @@ class EngineServiceClient {
|
|
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
|
-
listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines')
|
210
|
+
listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines')
|
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 createEngineResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.Engine');
|
340
229
|
const createEngineMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateEngineMetadata');
|
341
230
|
const deleteEngineResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
|
@@ -345,7 +234,7 @@ class EngineServiceClient {
|
|
345
234
|
this.descriptors.longrunning = {
|
346
235
|
createEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createEngineResponse.decode.bind(createEngineResponse), createEngineMetadata.decode.bind(createEngineMetadata)),
|
347
236
|
deleteEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteEngineResponse.decode.bind(deleteEngineResponse), deleteEngineMetadata.decode.bind(deleteEngineMetadata)),
|
348
|
-
tuneEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, tuneEngineResponse.decode.bind(tuneEngineResponse), tuneEngineMetadata.decode.bind(tuneEngineMetadata))
|
237
|
+
tuneEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, tuneEngineResponse.decode.bind(tuneEngineResponse), tuneEngineMetadata.decode.bind(tuneEngineMetadata))
|
349
238
|
};
|
350
239
|
// Put together the default options sent with requests.
|
351
240
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.EngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -374,23 +263,13 @@ class EngineServiceClient {
|
|
374
263
|
}
|
375
264
|
// Put together the "service stub" for
|
376
265
|
// google.cloud.discoveryengine.v1alpha.EngineService.
|
377
|
-
this.engineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
.EngineService, this._opts, this._providedCustomServicePath);
|
266
|
+
this.engineServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
267
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.EngineService') :
|
268
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
|
+
this._protos.google.cloud.discoveryengine.v1alpha.EngineService, this._opts, this._providedCustomServicePath);
|
382
270
|
// Iterate over each of the methods that the service provides
|
383
271
|
// and create an API call method for each.
|
384
|
-
const engineServiceStubMethods = [
|
385
|
-
'createEngine',
|
386
|
-
'deleteEngine',
|
387
|
-
'updateEngine',
|
388
|
-
'getEngine',
|
389
|
-
'listEngines',
|
390
|
-
'pauseEngine',
|
391
|
-
'resumeEngine',
|
392
|
-
'tuneEngine',
|
393
|
-
];
|
272
|
+
const engineServiceStubMethods = ['createEngine', 'deleteEngine', 'updateEngine', 'getEngine', 'listEngines', 'pauseEngine', 'resumeEngine', 'tuneEngine'];
|
394
273
|
for (const methodName of engineServiceStubMethods) {
|
395
274
|
const callPromise = this.engineServiceStub.then(stub => (...args) => {
|
396
275
|
if (this._terminated) {
|
@@ -415,8 +294,7 @@ class EngineServiceClient {
|
|
415
294
|
* @returns {string} The DNS address for this service.
|
416
295
|
*/
|
417
296
|
static get servicePath() {
|
418
|
-
if (typeof process === 'object' &&
|
419
|
-
typeof process.emitWarning === 'function') {
|
297
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
420
298
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
421
299
|
}
|
422
300
|
return 'discoveryengine.googleapis.com';
|
@@ -427,8 +305,7 @@ class EngineServiceClient {
|
|
427
305
|
* @returns {string} The DNS address for this service.
|
428
306
|
*/
|
429
307
|
static get apiEndpoint() {
|
430
|
-
if (typeof process === 'object' &&
|
431
|
-
typeof process.emitWarning === 'function') {
|
308
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
432
309
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
433
310
|
}
|
434
311
|
return 'discoveryengine.googleapis.com';
|
@@ -456,7 +333,9 @@ class EngineServiceClient {
|
|
456
333
|
* @returns {string[]} List of default scopes.
|
457
334
|
*/
|
458
335
|
static get scopes() {
|
459
|
-
return [
|
336
|
+
return [
|
337
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
338
|
+
];
|
460
339
|
}
|
461
340
|
/**
|
462
341
|
* Return the project ID used by this class.
|
@@ -482,13 +361,10 @@ class EngineServiceClient {
|
|
482
361
|
options = options || {};
|
483
362
|
options.otherArgs = options.otherArgs || {};
|
484
363
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
485
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
486
|
-
|
487
|
-
'engine.name': request.engine.name ?? '',
|
488
|
-
});
|
489
|
-
this.initialize().catch(err => {
|
490
|
-
throw err;
|
364
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
365
|
+
'engine.name': request.engine.name ?? '',
|
491
366
|
});
|
367
|
+
this.initialize().catch(err => { throw err; });
|
492
368
|
this._log.info('updateEngine request %j', request);
|
493
369
|
const wrappedCallback = callback
|
494
370
|
? (error, response, options, rawResponse) => {
|
@@ -496,11 +372,16 @@ class EngineServiceClient {
|
|
496
372
|
callback(error, response, options, rawResponse); // We verified callback above.
|
497
373
|
}
|
498
374
|
: undefined;
|
499
|
-
return this.innerApiCalls
|
500
|
-
.updateEngine(request, options, wrappedCallback)
|
375
|
+
return this.innerApiCalls.updateEngine(request, options, wrappedCallback)
|
501
376
|
?.then(([response, options, rawResponse]) => {
|
502
377
|
this._log.info('updateEngine response %j', response);
|
503
378
|
return [response, options, rawResponse];
|
379
|
+
}).catch((error) => {
|
380
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
381
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
382
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
383
|
+
}
|
384
|
+
throw error;
|
504
385
|
});
|
505
386
|
}
|
506
387
|
getEngine(request, optionsOrCallback, callback) {
|
@@ -516,13 +397,10 @@ class EngineServiceClient {
|
|
516
397
|
options = options || {};
|
517
398
|
options.otherArgs = options.otherArgs || {};
|
518
399
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
519
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
520
|
-
|
521
|
-
name: request.name ?? '',
|
522
|
-
});
|
523
|
-
this.initialize().catch(err => {
|
524
|
-
throw err;
|
400
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
401
|
+
'name': request.name ?? '',
|
525
402
|
});
|
403
|
+
this.initialize().catch(err => { throw err; });
|
526
404
|
this._log.info('getEngine request %j', request);
|
527
405
|
const wrappedCallback = callback
|
528
406
|
? (error, response, options, rawResponse) => {
|
@@ -530,11 +408,16 @@ class EngineServiceClient {
|
|
530
408
|
callback(error, response, options, rawResponse); // We verified callback above.
|
531
409
|
}
|
532
410
|
: undefined;
|
533
|
-
return this.innerApiCalls
|
534
|
-
.getEngine(request, options, wrappedCallback)
|
411
|
+
return this.innerApiCalls.getEngine(request, options, wrappedCallback)
|
535
412
|
?.then(([response, options, rawResponse]) => {
|
536
413
|
this._log.info('getEngine response %j', response);
|
537
414
|
return [response, options, rawResponse];
|
415
|
+
}).catch((error) => {
|
416
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
417
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
418
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
419
|
+
}
|
420
|
+
throw error;
|
538
421
|
});
|
539
422
|
}
|
540
423
|
pauseEngine(request, optionsOrCallback, callback) {
|
@@ -550,13 +433,10 @@ class EngineServiceClient {
|
|
550
433
|
options = options || {};
|
551
434
|
options.otherArgs = options.otherArgs || {};
|
552
435
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
553
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
554
|
-
|
555
|
-
name: request.name ?? '',
|
556
|
-
});
|
557
|
-
this.initialize().catch(err => {
|
558
|
-
throw err;
|
436
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
437
|
+
'name': request.name ?? '',
|
559
438
|
});
|
439
|
+
this.initialize().catch(err => { throw err; });
|
560
440
|
this._log.info('pauseEngine request %j', request);
|
561
441
|
const wrappedCallback = callback
|
562
442
|
? (error, response, options, rawResponse) => {
|
@@ -564,11 +444,16 @@ class EngineServiceClient {
|
|
564
444
|
callback(error, response, options, rawResponse); // We verified callback above.
|
565
445
|
}
|
566
446
|
: undefined;
|
567
|
-
return this.innerApiCalls
|
568
|
-
.pauseEngine(request, options, wrappedCallback)
|
447
|
+
return this.innerApiCalls.pauseEngine(request, options, wrappedCallback)
|
569
448
|
?.then(([response, options, rawResponse]) => {
|
570
449
|
this._log.info('pauseEngine response %j', response);
|
571
450
|
return [response, options, rawResponse];
|
451
|
+
}).catch((error) => {
|
452
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
453
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
454
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
455
|
+
}
|
456
|
+
throw error;
|
572
457
|
});
|
573
458
|
}
|
574
459
|
resumeEngine(request, optionsOrCallback, callback) {
|
@@ -584,13 +469,10 @@ class EngineServiceClient {
|
|
584
469
|
options = options || {};
|
585
470
|
options.otherArgs = options.otherArgs || {};
|
586
471
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
587
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
588
|
-
|
589
|
-
name: request.name ?? '',
|
590
|
-
});
|
591
|
-
this.initialize().catch(err => {
|
592
|
-
throw err;
|
472
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
473
|
+
'name': request.name ?? '',
|
593
474
|
});
|
475
|
+
this.initialize().catch(err => { throw err; });
|
594
476
|
this._log.info('resumeEngine request %j', request);
|
595
477
|
const wrappedCallback = callback
|
596
478
|
? (error, response, options, rawResponse) => {
|
@@ -598,11 +480,16 @@ class EngineServiceClient {
|
|
598
480
|
callback(error, response, options, rawResponse); // We verified callback above.
|
599
481
|
}
|
600
482
|
: undefined;
|
601
|
-
return this.innerApiCalls
|
602
|
-
.resumeEngine(request, options, wrappedCallback)
|
483
|
+
return this.innerApiCalls.resumeEngine(request, options, wrappedCallback)
|
603
484
|
?.then(([response, options, rawResponse]) => {
|
604
485
|
this._log.info('resumeEngine response %j', response);
|
605
486
|
return [response, options, rawResponse];
|
487
|
+
}).catch((error) => {
|
488
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
489
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
490
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
491
|
+
}
|
492
|
+
throw error;
|
606
493
|
});
|
607
494
|
}
|
608
495
|
createEngine(request, optionsOrCallback, callback) {
|
@@ -618,13 +505,10 @@ class EngineServiceClient {
|
|
618
505
|
options = options || {};
|
619
506
|
options.otherArgs = options.otherArgs || {};
|
620
507
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
621
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
622
|
-
|
623
|
-
parent: request.parent ?? '',
|
624
|
-
});
|
625
|
-
this.initialize().catch(err => {
|
626
|
-
throw err;
|
508
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
509
|
+
'parent': request.parent ?? '',
|
627
510
|
});
|
511
|
+
this.initialize().catch(err => { throw err; });
|
628
512
|
const wrappedCallback = callback
|
629
513
|
? (error, response, rawResponse, _) => {
|
630
514
|
this._log.info('createEngine response %j', rawResponse);
|
@@ -632,8 +516,7 @@ class EngineServiceClient {
|
|
632
516
|
}
|
633
517
|
: undefined;
|
634
518
|
this._log.info('createEngine request %j', request);
|
635
|
-
return this.innerApiCalls
|
636
|
-
.createEngine(request, options, wrappedCallback)
|
519
|
+
return this.innerApiCalls.createEngine(request, options, wrappedCallback)
|
637
520
|
?.then(([response, rawResponse, _]) => {
|
638
521
|
this._log.info('createEngine response %j', rawResponse);
|
639
522
|
return [response, rawResponse, _];
|
@@ -670,13 +553,10 @@ class EngineServiceClient {
|
|
670
553
|
options = options || {};
|
671
554
|
options.otherArgs = options.otherArgs || {};
|
672
555
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
673
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
674
|
-
|
675
|
-
name: request.name ?? '',
|
676
|
-
});
|
677
|
-
this.initialize().catch(err => {
|
678
|
-
throw err;
|
556
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
557
|
+
'name': request.name ?? '',
|
679
558
|
});
|
559
|
+
this.initialize().catch(err => { throw err; });
|
680
560
|
const wrappedCallback = callback
|
681
561
|
? (error, response, rawResponse, _) => {
|
682
562
|
this._log.info('deleteEngine response %j', rawResponse);
|
@@ -684,8 +564,7 @@ class EngineServiceClient {
|
|
684
564
|
}
|
685
565
|
: undefined;
|
686
566
|
this._log.info('deleteEngine request %j', request);
|
687
|
-
return this.innerApiCalls
|
688
|
-
.deleteEngine(request, options, wrappedCallback)
|
567
|
+
return this.innerApiCalls.deleteEngine(request, options, wrappedCallback)
|
689
568
|
?.then(([response, rawResponse, _]) => {
|
690
569
|
this._log.info('deleteEngine response %j', rawResponse);
|
691
570
|
return [response, rawResponse, _];
|
@@ -722,13 +601,10 @@ class EngineServiceClient {
|
|
722
601
|
options = options || {};
|
723
602
|
options.otherArgs = options.otherArgs || {};
|
724
603
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
725
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
726
|
-
|
727
|
-
name: request.name ?? '',
|
728
|
-
});
|
729
|
-
this.initialize().catch(err => {
|
730
|
-
throw err;
|
604
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
605
|
+
'name': request.name ?? '',
|
731
606
|
});
|
607
|
+
this.initialize().catch(err => { throw err; });
|
732
608
|
const wrappedCallback = callback
|
733
609
|
? (error, response, rawResponse, _) => {
|
734
610
|
this._log.info('tuneEngine response %j', rawResponse);
|
@@ -736,8 +612,7 @@ class EngineServiceClient {
|
|
736
612
|
}
|
737
613
|
: undefined;
|
738
614
|
this._log.info('tuneEngine request %j', request);
|
739
|
-
return this.innerApiCalls
|
740
|
-
.tuneEngine(request, options, wrappedCallback)
|
615
|
+
return this.innerApiCalls.tuneEngine(request, options, wrappedCallback)
|
741
616
|
?.then(([response, rawResponse, _]) => {
|
742
617
|
this._log.info('tuneEngine response %j', rawResponse);
|
743
618
|
return [response, rawResponse, _];
|
@@ -774,13 +649,10 @@ class EngineServiceClient {
|
|
774
649
|
options = options || {};
|
775
650
|
options.otherArgs = options.otherArgs || {};
|
776
651
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
777
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
778
|
-
|
779
|
-
parent: request.parent ?? '',
|
780
|
-
});
|
781
|
-
this.initialize().catch(err => {
|
782
|
-
throw err;
|
652
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
653
|
+
'parent': request.parent ?? '',
|
783
654
|
});
|
655
|
+
this.initialize().catch(err => { throw err; });
|
784
656
|
const wrappedCallback = callback
|
785
657
|
? (error, values, nextPageRequest, rawResponse) => {
|
786
658
|
this._log.info('listEngines values %j', values);
|
@@ -825,15 +697,12 @@ class EngineServiceClient {
|
|
825
697
|
options = options || {};
|
826
698
|
options.otherArgs = options.otherArgs || {};
|
827
699
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
828
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
829
|
-
|
830
|
-
|
831
|
-
});
|
700
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
701
|
+
'parent': request.parent ?? '',
|
702
|
+
});
|
832
703
|
const defaultCallSettings = this._defaults['listEngines'];
|
833
704
|
const callSettings = defaultCallSettings.merge(options);
|
834
|
-
this.initialize().catch(err => {
|
835
|
-
throw err;
|
836
|
-
});
|
705
|
+
this.initialize().catch(err => { throw err; });
|
837
706
|
this._log.info('listEngines stream %j', request);
|
838
707
|
return this.descriptors.page.listEngines.createStream(this.innerApiCalls.listEngines, request, callSettings);
|
839
708
|
}
|
@@ -870,103 +739,100 @@ class EngineServiceClient {
|
|
870
739
|
options = options || {};
|
871
740
|
options.otherArgs = options.otherArgs || {};
|
872
741
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
873
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
874
|
-
|
875
|
-
|
876
|
-
});
|
742
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
743
|
+
'parent': request.parent ?? '',
|
744
|
+
});
|
877
745
|
const defaultCallSettings = this._defaults['listEngines'];
|
878
746
|
const callSettings = defaultCallSettings.merge(options);
|
879
|
-
this.initialize().catch(err => {
|
880
|
-
throw err;
|
881
|
-
});
|
747
|
+
this.initialize().catch(err => { throw err; });
|
882
748
|
this._log.info('listEngines iterate %j', request);
|
883
749
|
return this.descriptors.page.listEngines.asyncIterate(this.innerApiCalls['listEngines'], request, callSettings);
|
884
750
|
}
|
885
751
|
/**
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
752
|
+
* Gets information about a location.
|
753
|
+
*
|
754
|
+
* @param {Object} request
|
755
|
+
* The request object that will be sent.
|
756
|
+
* @param {string} request.name
|
757
|
+
* Resource name for the location.
|
758
|
+
* @param {object} [options]
|
759
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
760
|
+
* @returns {Promise} - The promise which resolves to an array.
|
761
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
762
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
763
|
+
* for more details and examples.
|
764
|
+
* @example
|
765
|
+
* ```
|
766
|
+
* const [response] = await client.getLocation(request);
|
767
|
+
* ```
|
768
|
+
*/
|
903
769
|
getLocation(request, options, callback) {
|
904
770
|
return this.locationsClient.getLocation(request, options, callback);
|
905
771
|
}
|
906
772
|
/**
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
773
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
774
|
+
*
|
775
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
776
|
+
* @param {Object} request
|
777
|
+
* The request object that will be sent.
|
778
|
+
* @param {string} request.name
|
779
|
+
* The resource that owns the locations collection, if applicable.
|
780
|
+
* @param {string} request.filter
|
781
|
+
* The standard list filter.
|
782
|
+
* @param {number} request.pageSize
|
783
|
+
* The standard list page size.
|
784
|
+
* @param {string} request.pageToken
|
785
|
+
* The standard list page token.
|
786
|
+
* @param {object} [options]
|
787
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
788
|
+
* @returns {Object}
|
789
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
790
|
+
* When you iterate the returned iterable, each element will be an object representing
|
791
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
792
|
+
* so you can stop the iteration when you don't need more results.
|
793
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
794
|
+
* for more details and examples.
|
795
|
+
* @example
|
796
|
+
* ```
|
797
|
+
* const iterable = client.listLocationsAsync(request);
|
798
|
+
* for await (const response of iterable) {
|
799
|
+
* // process response
|
800
|
+
* }
|
801
|
+
* ```
|
802
|
+
*/
|
937
803
|
listLocationsAsync(request, options) {
|
938
804
|
return this.locationsClient.listLocationsAsync(request, options);
|
939
805
|
}
|
940
806
|
/**
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
807
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
808
|
+
* method to poll the operation result at intervals as recommended by the API
|
809
|
+
* service.
|
810
|
+
*
|
811
|
+
* @param {Object} request - The request object that will be sent.
|
812
|
+
* @param {string} request.name - The name of the operation resource.
|
813
|
+
* @param {Object=} options
|
814
|
+
* Optional parameters. You can override the default settings for this call,
|
815
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
816
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
817
|
+
* for the details.
|
818
|
+
* @param {function(?Error, ?Object)=} callback
|
819
|
+
* The function which will be called with the result of the API call.
|
820
|
+
*
|
821
|
+
* The second parameter to the callback is an object representing
|
822
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
823
|
+
* @return {Promise} - The promise which resolves to an array.
|
824
|
+
* The first element of the array is an object representing
|
825
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
826
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
827
|
+
*
|
828
|
+
* @example
|
829
|
+
* ```
|
830
|
+
* const client = longrunning.operationsClient();
|
831
|
+
* const name = '';
|
832
|
+
* const [response] = await client.getOperation({name});
|
833
|
+
* // doThingsWith(response)
|
834
|
+
* ```
|
835
|
+
*/
|
970
836
|
getOperation(request, optionsOrCallback, callback) {
|
971
837
|
let options;
|
972
838
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1141,8 +1007,7 @@ class EngineServiceClient {
|
|
1141
1007
|
* @returns {string} A string representing the project.
|
1142
1008
|
*/
|
1143
1009
|
matchProjectFromAclConfigName(aclConfigName) {
|
1144
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1145
|
-
.project;
|
1010
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1146
1011
|
}
|
1147
1012
|
/**
|
1148
1013
|
* Parse the location from AclConfig resource.
|
@@ -1152,8 +1017,7 @@ class EngineServiceClient {
|
|
1152
1017
|
* @returns {string} A string representing the location.
|
1153
1018
|
*/
|
1154
1019
|
matchLocationFromAclConfigName(aclConfigName) {
|
1155
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1156
|
-
.location;
|
1020
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1157
1021
|
}
|
1158
1022
|
/**
|
1159
1023
|
* Return a fully-qualified collection resource name string.
|
@@ -1178,8 +1042,7 @@ class EngineServiceClient {
|
|
1178
1042
|
* @returns {string} A string representing the project.
|
1179
1043
|
*/
|
1180
1044
|
matchProjectFromCollectionName(collectionName) {
|
1181
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1182
|
-
.project;
|
1045
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
|
1183
1046
|
}
|
1184
1047
|
/**
|
1185
1048
|
* Parse the location from Collection resource.
|
@@ -1189,8 +1052,7 @@ class EngineServiceClient {
|
|
1189
1052
|
* @returns {string} A string representing the location.
|
1190
1053
|
*/
|
1191
1054
|
matchLocationFromCollectionName(collectionName) {
|
1192
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1193
|
-
.location;
|
1055
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
|
1194
1056
|
}
|
1195
1057
|
/**
|
1196
1058
|
* Parse the collection from Collection resource.
|
@@ -1200,8 +1062,7 @@ class EngineServiceClient {
|
|
1200
1062
|
* @returns {string} A string representing the collection.
|
1201
1063
|
*/
|
1202
1064
|
matchCollectionFromCollectionName(collectionName) {
|
1203
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1204
|
-
.collection;
|
1065
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
|
1205
1066
|
}
|
1206
1067
|
/**
|
1207
1068
|
* Return a fully-qualified engine resource name string.
|
@@ -1283,8 +1144,7 @@ class EngineServiceClient {
|
|
1283
1144
|
* @returns {string} A string representing the project.
|
1284
1145
|
*/
|
1285
1146
|
matchProjectFromEvaluationName(evaluationName) {
|
1286
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1287
|
-
.project;
|
1147
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1288
1148
|
}
|
1289
1149
|
/**
|
1290
1150
|
* Parse the location from Evaluation resource.
|
@@ -1294,8 +1154,7 @@ class EngineServiceClient {
|
|
1294
1154
|
* @returns {string} A string representing the location.
|
1295
1155
|
*/
|
1296
1156
|
matchLocationFromEvaluationName(evaluationName) {
|
1297
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1298
|
-
.location;
|
1157
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1299
1158
|
}
|
1300
1159
|
/**
|
1301
1160
|
* Parse the evaluation from Evaluation resource.
|
@@ -1305,8 +1164,7 @@ class EngineServiceClient {
|
|
1305
1164
|
* @returns {string} A string representing the evaluation.
|
1306
1165
|
*/
|
1307
1166
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1308
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1309
|
-
.evaluation;
|
1167
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1310
1168
|
}
|
1311
1169
|
/**
|
1312
1170
|
* Return a fully-qualified project resource name string.
|
@@ -3373,8 +3231,7 @@ class EngineServiceClient {
|
|
3373
3231
|
* @returns {string} A string representing the project.
|
3374
3232
|
*/
|
3375
3233
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3376
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3377
|
-
.project;
|
3234
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3378
3235
|
}
|
3379
3236
|
/**
|
3380
3237
|
* Parse the location from SampleQuery resource.
|
@@ -3384,8 +3241,7 @@ class EngineServiceClient {
|
|
3384
3241
|
* @returns {string} A string representing the location.
|
3385
3242
|
*/
|
3386
3243
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3387
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3388
|
-
.location;
|
3244
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3389
3245
|
}
|
3390
3246
|
/**
|
3391
3247
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3395,8 +3251,7 @@ class EngineServiceClient {
|
|
3395
3251
|
* @returns {string} A string representing the sample_query_set.
|
3396
3252
|
*/
|
3397
3253
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3398
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3399
|
-
.sample_query_set;
|
3254
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3400
3255
|
}
|
3401
3256
|
/**
|
3402
3257
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3406,8 +3261,7 @@ class EngineServiceClient {
|
|
3406
3261
|
* @returns {string} A string representing the sample_query.
|
3407
3262
|
*/
|
3408
3263
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3409
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3410
|
-
.sample_query;
|
3264
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3411
3265
|
}
|
3412
3266
|
/**
|
3413
3267
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3466,8 +3320,8 @@ class EngineServiceClient {
|
|
3466
3320
|
this._log.info('ending gRPC channel');
|
3467
3321
|
this._terminated = true;
|
3468
3322
|
stub.close();
|
3469
|
-
this.locationsClient.close();
|
3470
|
-
this.operationsClient.close();
|
3323
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3324
|
+
void this.operationsClient.close();
|
3471
3325
|
});
|
3472
3326
|
}
|
3473
3327
|
return Promise.resolve();
|