@google-cloud/discoveryengine 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -99,26 +99,17 @@ class 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,7 +207,7 @@ 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
212
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
219
213
|
// This API contains "long-running operations", which return a
|
@@ -221,121 +215,16 @@ class EngineServiceClient {
|
|
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,8 +372,7 @@ 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];
|
@@ -516,13 +391,10 @@ class EngineServiceClient {
|
|
516
391
|
options = options || {};
|
517
392
|
options.otherArgs = options.otherArgs || {};
|
518
393
|
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;
|
394
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
395
|
+
'name': request.name ?? '',
|
525
396
|
});
|
397
|
+
this.initialize().catch(err => { throw err; });
|
526
398
|
this._log.info('getEngine request %j', request);
|
527
399
|
const wrappedCallback = callback
|
528
400
|
? (error, response, options, rawResponse) => {
|
@@ -530,8 +402,7 @@ class EngineServiceClient {
|
|
530
402
|
callback(error, response, options, rawResponse); // We verified callback above.
|
531
403
|
}
|
532
404
|
: undefined;
|
533
|
-
return this.innerApiCalls
|
534
|
-
.getEngine(request, options, wrappedCallback)
|
405
|
+
return this.innerApiCalls.getEngine(request, options, wrappedCallback)
|
535
406
|
?.then(([response, options, rawResponse]) => {
|
536
407
|
this._log.info('getEngine response %j', response);
|
537
408
|
return [response, options, rawResponse];
|
@@ -550,13 +421,10 @@ class EngineServiceClient {
|
|
550
421
|
options = options || {};
|
551
422
|
options.otherArgs = options.otherArgs || {};
|
552
423
|
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;
|
424
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
425
|
+
'name': request.name ?? '',
|
559
426
|
});
|
427
|
+
this.initialize().catch(err => { throw err; });
|
560
428
|
this._log.info('pauseEngine request %j', request);
|
561
429
|
const wrappedCallback = callback
|
562
430
|
? (error, response, options, rawResponse) => {
|
@@ -564,8 +432,7 @@ class EngineServiceClient {
|
|
564
432
|
callback(error, response, options, rawResponse); // We verified callback above.
|
565
433
|
}
|
566
434
|
: undefined;
|
567
|
-
return this.innerApiCalls
|
568
|
-
.pauseEngine(request, options, wrappedCallback)
|
435
|
+
return this.innerApiCalls.pauseEngine(request, options, wrappedCallback)
|
569
436
|
?.then(([response, options, rawResponse]) => {
|
570
437
|
this._log.info('pauseEngine response %j', response);
|
571
438
|
return [response, options, rawResponse];
|
@@ -584,13 +451,10 @@ class EngineServiceClient {
|
|
584
451
|
options = options || {};
|
585
452
|
options.otherArgs = options.otherArgs || {};
|
586
453
|
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;
|
454
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
455
|
+
'name': request.name ?? '',
|
593
456
|
});
|
457
|
+
this.initialize().catch(err => { throw err; });
|
594
458
|
this._log.info('resumeEngine request %j', request);
|
595
459
|
const wrappedCallback = callback
|
596
460
|
? (error, response, options, rawResponse) => {
|
@@ -598,8 +462,7 @@ class EngineServiceClient {
|
|
598
462
|
callback(error, response, options, rawResponse); // We verified callback above.
|
599
463
|
}
|
600
464
|
: undefined;
|
601
|
-
return this.innerApiCalls
|
602
|
-
.resumeEngine(request, options, wrappedCallback)
|
465
|
+
return this.innerApiCalls.resumeEngine(request, options, wrappedCallback)
|
603
466
|
?.then(([response, options, rawResponse]) => {
|
604
467
|
this._log.info('resumeEngine response %j', response);
|
605
468
|
return [response, options, rawResponse];
|
@@ -618,13 +481,10 @@ class EngineServiceClient {
|
|
618
481
|
options = options || {};
|
619
482
|
options.otherArgs = options.otherArgs || {};
|
620
483
|
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;
|
484
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
485
|
+
'parent': request.parent ?? '',
|
627
486
|
});
|
487
|
+
this.initialize().catch(err => { throw err; });
|
628
488
|
const wrappedCallback = callback
|
629
489
|
? (error, response, rawResponse, _) => {
|
630
490
|
this._log.info('createEngine response %j', rawResponse);
|
@@ -632,8 +492,7 @@ class EngineServiceClient {
|
|
632
492
|
}
|
633
493
|
: undefined;
|
634
494
|
this._log.info('createEngine request %j', request);
|
635
|
-
return this.innerApiCalls
|
636
|
-
.createEngine(request, options, wrappedCallback)
|
495
|
+
return this.innerApiCalls.createEngine(request, options, wrappedCallback)
|
637
496
|
?.then(([response, rawResponse, _]) => {
|
638
497
|
this._log.info('createEngine response %j', rawResponse);
|
639
498
|
return [response, rawResponse, _];
|
@@ -670,13 +529,10 @@ class EngineServiceClient {
|
|
670
529
|
options = options || {};
|
671
530
|
options.otherArgs = options.otherArgs || {};
|
672
531
|
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;
|
532
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
533
|
+
'name': request.name ?? '',
|
679
534
|
});
|
535
|
+
this.initialize().catch(err => { throw err; });
|
680
536
|
const wrappedCallback = callback
|
681
537
|
? (error, response, rawResponse, _) => {
|
682
538
|
this._log.info('deleteEngine response %j', rawResponse);
|
@@ -684,8 +540,7 @@ class EngineServiceClient {
|
|
684
540
|
}
|
685
541
|
: undefined;
|
686
542
|
this._log.info('deleteEngine request %j', request);
|
687
|
-
return this.innerApiCalls
|
688
|
-
.deleteEngine(request, options, wrappedCallback)
|
543
|
+
return this.innerApiCalls.deleteEngine(request, options, wrappedCallback)
|
689
544
|
?.then(([response, rawResponse, _]) => {
|
690
545
|
this._log.info('deleteEngine response %j', rawResponse);
|
691
546
|
return [response, rawResponse, _];
|
@@ -722,13 +577,10 @@ class EngineServiceClient {
|
|
722
577
|
options = options || {};
|
723
578
|
options.otherArgs = options.otherArgs || {};
|
724
579
|
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;
|
580
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
581
|
+
'name': request.name ?? '',
|
731
582
|
});
|
583
|
+
this.initialize().catch(err => { throw err; });
|
732
584
|
const wrappedCallback = callback
|
733
585
|
? (error, response, rawResponse, _) => {
|
734
586
|
this._log.info('tuneEngine response %j', rawResponse);
|
@@ -736,8 +588,7 @@ class EngineServiceClient {
|
|
736
588
|
}
|
737
589
|
: undefined;
|
738
590
|
this._log.info('tuneEngine request %j', request);
|
739
|
-
return this.innerApiCalls
|
740
|
-
.tuneEngine(request, options, wrappedCallback)
|
591
|
+
return this.innerApiCalls.tuneEngine(request, options, wrappedCallback)
|
741
592
|
?.then(([response, rawResponse, _]) => {
|
742
593
|
this._log.info('tuneEngine response %j', rawResponse);
|
743
594
|
return [response, rawResponse, _];
|
@@ -774,13 +625,10 @@ class EngineServiceClient {
|
|
774
625
|
options = options || {};
|
775
626
|
options.otherArgs = options.otherArgs || {};
|
776
627
|
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;
|
628
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
629
|
+
'parent': request.parent ?? '',
|
783
630
|
});
|
631
|
+
this.initialize().catch(err => { throw err; });
|
784
632
|
const wrappedCallback = callback
|
785
633
|
? (error, values, nextPageRequest, rawResponse) => {
|
786
634
|
this._log.info('listEngines values %j', values);
|
@@ -825,15 +673,12 @@ class EngineServiceClient {
|
|
825
673
|
options = options || {};
|
826
674
|
options.otherArgs = options.otherArgs || {};
|
827
675
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
828
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
829
|
-
|
830
|
-
|
831
|
-
});
|
676
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
677
|
+
'parent': request.parent ?? '',
|
678
|
+
});
|
832
679
|
const defaultCallSettings = this._defaults['listEngines'];
|
833
680
|
const callSettings = defaultCallSettings.merge(options);
|
834
|
-
this.initialize().catch(err => {
|
835
|
-
throw err;
|
836
|
-
});
|
681
|
+
this.initialize().catch(err => { throw err; });
|
837
682
|
this._log.info('listEngines stream %j', request);
|
838
683
|
return this.descriptors.page.listEngines.createStream(this.innerApiCalls.listEngines, request, callSettings);
|
839
684
|
}
|
@@ -870,103 +715,100 @@ class EngineServiceClient {
|
|
870
715
|
options = options || {};
|
871
716
|
options.otherArgs = options.otherArgs || {};
|
872
717
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
873
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
874
|
-
|
875
|
-
|
876
|
-
});
|
718
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
719
|
+
'parent': request.parent ?? '',
|
720
|
+
});
|
877
721
|
const defaultCallSettings = this._defaults['listEngines'];
|
878
722
|
const callSettings = defaultCallSettings.merge(options);
|
879
|
-
this.initialize().catch(err => {
|
880
|
-
throw err;
|
881
|
-
});
|
723
|
+
this.initialize().catch(err => { throw err; });
|
882
724
|
this._log.info('listEngines iterate %j', request);
|
883
725
|
return this.descriptors.page.listEngines.asyncIterate(this.innerApiCalls['listEngines'], request, callSettings);
|
884
726
|
}
|
885
727
|
/**
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
728
|
+
* Gets information about a location.
|
729
|
+
*
|
730
|
+
* @param {Object} request
|
731
|
+
* The request object that will be sent.
|
732
|
+
* @param {string} request.name
|
733
|
+
* Resource name for the location.
|
734
|
+
* @param {object} [options]
|
735
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
736
|
+
* @returns {Promise} - The promise which resolves to an array.
|
737
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
738
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
739
|
+
* for more details and examples.
|
740
|
+
* @example
|
741
|
+
* ```
|
742
|
+
* const [response] = await client.getLocation(request);
|
743
|
+
* ```
|
744
|
+
*/
|
903
745
|
getLocation(request, options, callback) {
|
904
746
|
return this.locationsClient.getLocation(request, options, callback);
|
905
747
|
}
|
906
748
|
/**
|
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
|
-
|
749
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
750
|
+
*
|
751
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
752
|
+
* @param {Object} request
|
753
|
+
* The request object that will be sent.
|
754
|
+
* @param {string} request.name
|
755
|
+
* The resource that owns the locations collection, if applicable.
|
756
|
+
* @param {string} request.filter
|
757
|
+
* The standard list filter.
|
758
|
+
* @param {number} request.pageSize
|
759
|
+
* The standard list page size.
|
760
|
+
* @param {string} request.pageToken
|
761
|
+
* The standard list page token.
|
762
|
+
* @param {object} [options]
|
763
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
764
|
+
* @returns {Object}
|
765
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
766
|
+
* When you iterate the returned iterable, each element will be an object representing
|
767
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
768
|
+
* so you can stop the iteration when you don't need more results.
|
769
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
770
|
+
* for more details and examples.
|
771
|
+
* @example
|
772
|
+
* ```
|
773
|
+
* const iterable = client.listLocationsAsync(request);
|
774
|
+
* for await (const response of iterable) {
|
775
|
+
* // process response
|
776
|
+
* }
|
777
|
+
* ```
|
778
|
+
*/
|
937
779
|
listLocationsAsync(request, options) {
|
938
780
|
return this.locationsClient.listLocationsAsync(request, options);
|
939
781
|
}
|
940
782
|
/**
|
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
|
-
|
783
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
784
|
+
* method to poll the operation result at intervals as recommended by the API
|
785
|
+
* service.
|
786
|
+
*
|
787
|
+
* @param {Object} request - The request object that will be sent.
|
788
|
+
* @param {string} request.name - The name of the operation resource.
|
789
|
+
* @param {Object=} options
|
790
|
+
* Optional parameters. You can override the default settings for this call,
|
791
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
792
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
793
|
+
* for the details.
|
794
|
+
* @param {function(?Error, ?Object)=} callback
|
795
|
+
* The function which will be called with the result of the API call.
|
796
|
+
*
|
797
|
+
* The second parameter to the callback is an object representing
|
798
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
799
|
+
* @return {Promise} - The promise which resolves to an array.
|
800
|
+
* The first element of the array is an object representing
|
801
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
802
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
803
|
+
*
|
804
|
+
* @example
|
805
|
+
* ```
|
806
|
+
* const client = longrunning.operationsClient();
|
807
|
+
* const name = '';
|
808
|
+
* const [response] = await client.getOperation({name});
|
809
|
+
* // doThingsWith(response)
|
810
|
+
* ```
|
811
|
+
*/
|
970
812
|
getOperation(request, optionsOrCallback, callback) {
|
971
813
|
let options;
|
972
814
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1141,8 +983,7 @@ class EngineServiceClient {
|
|
1141
983
|
* @returns {string} A string representing the project.
|
1142
984
|
*/
|
1143
985
|
matchProjectFromAclConfigName(aclConfigName) {
|
1144
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1145
|
-
.project;
|
986
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1146
987
|
}
|
1147
988
|
/**
|
1148
989
|
* Parse the location from AclConfig resource.
|
@@ -1152,8 +993,7 @@ class EngineServiceClient {
|
|
1152
993
|
* @returns {string} A string representing the location.
|
1153
994
|
*/
|
1154
995
|
matchLocationFromAclConfigName(aclConfigName) {
|
1155
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1156
|
-
.location;
|
996
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1157
997
|
}
|
1158
998
|
/**
|
1159
999
|
* Return a fully-qualified collection resource name string.
|
@@ -1178,8 +1018,7 @@ class EngineServiceClient {
|
|
1178
1018
|
* @returns {string} A string representing the project.
|
1179
1019
|
*/
|
1180
1020
|
matchProjectFromCollectionName(collectionName) {
|
1181
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1182
|
-
.project;
|
1021
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
|
1183
1022
|
}
|
1184
1023
|
/**
|
1185
1024
|
* Parse the location from Collection resource.
|
@@ -1189,8 +1028,7 @@ class EngineServiceClient {
|
|
1189
1028
|
* @returns {string} A string representing the location.
|
1190
1029
|
*/
|
1191
1030
|
matchLocationFromCollectionName(collectionName) {
|
1192
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1193
|
-
.location;
|
1031
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
|
1194
1032
|
}
|
1195
1033
|
/**
|
1196
1034
|
* Parse the collection from Collection resource.
|
@@ -1200,8 +1038,7 @@ class EngineServiceClient {
|
|
1200
1038
|
* @returns {string} A string representing the collection.
|
1201
1039
|
*/
|
1202
1040
|
matchCollectionFromCollectionName(collectionName) {
|
1203
|
-
return this.pathTemplates.collectionPathTemplate.match(collectionName)
|
1204
|
-
.collection;
|
1041
|
+
return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
|
1205
1042
|
}
|
1206
1043
|
/**
|
1207
1044
|
* Return a fully-qualified engine resource name string.
|
@@ -1283,8 +1120,7 @@ class EngineServiceClient {
|
|
1283
1120
|
* @returns {string} A string representing the project.
|
1284
1121
|
*/
|
1285
1122
|
matchProjectFromEvaluationName(evaluationName) {
|
1286
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1287
|
-
.project;
|
1123
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1288
1124
|
}
|
1289
1125
|
/**
|
1290
1126
|
* Parse the location from Evaluation resource.
|
@@ -1294,8 +1130,7 @@ class EngineServiceClient {
|
|
1294
1130
|
* @returns {string} A string representing the location.
|
1295
1131
|
*/
|
1296
1132
|
matchLocationFromEvaluationName(evaluationName) {
|
1297
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1298
|
-
.location;
|
1133
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1299
1134
|
}
|
1300
1135
|
/**
|
1301
1136
|
* Parse the evaluation from Evaluation resource.
|
@@ -1305,8 +1140,7 @@ class EngineServiceClient {
|
|
1305
1140
|
* @returns {string} A string representing the evaluation.
|
1306
1141
|
*/
|
1307
1142
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1308
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1309
|
-
.evaluation;
|
1143
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1310
1144
|
}
|
1311
1145
|
/**
|
1312
1146
|
* Return a fully-qualified project resource name string.
|
@@ -3373,8 +3207,7 @@ class EngineServiceClient {
|
|
3373
3207
|
* @returns {string} A string representing the project.
|
3374
3208
|
*/
|
3375
3209
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3376
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3377
|
-
.project;
|
3210
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3378
3211
|
}
|
3379
3212
|
/**
|
3380
3213
|
* Parse the location from SampleQuery resource.
|
@@ -3384,8 +3217,7 @@ class EngineServiceClient {
|
|
3384
3217
|
* @returns {string} A string representing the location.
|
3385
3218
|
*/
|
3386
3219
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3387
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3388
|
-
.location;
|
3220
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3389
3221
|
}
|
3390
3222
|
/**
|
3391
3223
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3395,8 +3227,7 @@ class EngineServiceClient {
|
|
3395
3227
|
* @returns {string} A string representing the sample_query_set.
|
3396
3228
|
*/
|
3397
3229
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3398
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3399
|
-
.sample_query_set;
|
3230
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3400
3231
|
}
|
3401
3232
|
/**
|
3402
3233
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3406,8 +3237,7 @@ class EngineServiceClient {
|
|
3406
3237
|
* @returns {string} A string representing the sample_query.
|
3407
3238
|
*/
|
3408
3239
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3409
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3410
|
-
.sample_query;
|
3240
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3411
3241
|
}
|
3412
3242
|
/**
|
3413
3243
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3466,8 +3296,8 @@ class EngineServiceClient {
|
|
3466
3296
|
this._log.info('ending gRPC channel');
|
3467
3297
|
this._terminated = true;
|
3468
3298
|
stub.close();
|
3469
|
-
this.locationsClient.close();
|
3470
|
-
this.operationsClient.close();
|
3299
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3300
|
+
void this.operationsClient.close();
|
3471
3301
|
});
|
3472
3302
|
}
|
3473
3303
|
return Promise.resolve();
|