@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 SampleQueryServiceClient {
|
|
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 SampleQueryServiceClient {
|
|
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
|
}
|
@@ -212,133 +206,28 @@ class SampleQueryServiceClient {
|
|
212
206
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
213
207
|
// pages). Denote the keys used for pagination and results.
|
214
208
|
this.descriptors.page = {
|
215
|
-
listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
|
209
|
+
listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
|
216
210
|
};
|
217
|
-
const protoFilesRoot = this._gaxModule.
|
211
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
218
212
|
// This API contains "long-running operations", which return a
|
219
213
|
// an Operation object that allows for tracking of the operation,
|
220
214
|
// rather than holding a request open.
|
221
215
|
const lroOptions = {
|
222
216
|
auth: this.auth,
|
223
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
217
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
224
218
|
};
|
225
219
|
if (opts.fallback) {
|
226
220
|
lroOptions.protoJson = protoFilesRoot;
|
227
|
-
lroOptions.httpRules = [
|
228
|
-
{
|
229
|
-
|
230
|
-
|
231
|
-
body: '*',
|
232
|
-
additional_bindings: [
|
233
|
-
{
|
234
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
235
|
-
body: '*',
|
236
|
-
},
|
237
|
-
],
|
238
|
-
},
|
239
|
-
{
|
240
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
241
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
242
|
-
additional_bindings: [
|
243
|
-
{
|
244
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
245
|
-
},
|
246
|
-
{
|
247
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
248
|
-
},
|
249
|
-
{
|
250
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
251
|
-
},
|
252
|
-
{
|
253
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
254
|
-
},
|
255
|
-
{
|
256
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
257
|
-
},
|
258
|
-
{
|
259
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
260
|
-
},
|
261
|
-
{
|
262
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
263
|
-
},
|
264
|
-
{
|
265
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
266
|
-
},
|
267
|
-
{
|
268
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
269
|
-
},
|
270
|
-
{
|
271
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
272
|
-
},
|
273
|
-
{
|
274
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
275
|
-
},
|
276
|
-
{
|
277
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
278
|
-
},
|
279
|
-
{
|
280
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
281
|
-
},
|
282
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
283
|
-
{
|
284
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
285
|
-
},
|
286
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
287
|
-
],
|
288
|
-
},
|
289
|
-
{
|
290
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
291
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
292
|
-
additional_bindings: [
|
293
|
-
{
|
294
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
295
|
-
},
|
296
|
-
{
|
297
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
298
|
-
},
|
299
|
-
{
|
300
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
301
|
-
},
|
302
|
-
{
|
303
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
304
|
-
},
|
305
|
-
{
|
306
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
307
|
-
},
|
308
|
-
{
|
309
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
310
|
-
},
|
311
|
-
{
|
312
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
313
|
-
},
|
314
|
-
{
|
315
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
316
|
-
},
|
317
|
-
{
|
318
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
319
|
-
},
|
320
|
-
{
|
321
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
322
|
-
},
|
323
|
-
{
|
324
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
325
|
-
},
|
326
|
-
{
|
327
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
328
|
-
},
|
329
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
330
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
331
|
-
],
|
332
|
-
},
|
333
|
-
];
|
221
|
+
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: '*', }],
|
222
|
+
}, { 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/*}', }],
|
223
|
+
}, { 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', }],
|
224
|
+
}];
|
334
225
|
}
|
335
|
-
this.operationsClient = this._gaxModule
|
336
|
-
.lro(lroOptions)
|
337
|
-
.operationsClient(opts);
|
226
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
338
227
|
const importSampleQueriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesResponse');
|
339
228
|
const importSampleQueriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesMetadata');
|
340
229
|
this.descriptors.longrunning = {
|
341
|
-
importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata))
|
230
|
+
importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata))
|
342
231
|
};
|
343
232
|
// Put together the default options sent with requests.
|
344
233
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SampleQueryService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -367,21 +256,13 @@ class SampleQueryServiceClient {
|
|
367
256
|
}
|
368
257
|
// Put together the "service stub" for
|
369
258
|
// google.cloud.discoveryengine.v1alpha.SampleQueryService.
|
370
|
-
this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
.SampleQueryService, this._opts, this._providedCustomServicePath);
|
259
|
+
this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
260
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SampleQueryService') :
|
261
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
262
|
+
this._protos.google.cloud.discoveryengine.v1alpha.SampleQueryService, this._opts, this._providedCustomServicePath);
|
375
263
|
// Iterate over each of the methods that the service provides
|
376
264
|
// and create an API call method for each.
|
377
|
-
const sampleQueryServiceStubMethods = [
|
378
|
-
'getSampleQuery',
|
379
|
-
'listSampleQueries',
|
380
|
-
'createSampleQuery',
|
381
|
-
'updateSampleQuery',
|
382
|
-
'deleteSampleQuery',
|
383
|
-
'importSampleQueries',
|
384
|
-
];
|
265
|
+
const sampleQueryServiceStubMethods = ['getSampleQuery', 'listSampleQueries', 'createSampleQuery', 'updateSampleQuery', 'deleteSampleQuery', 'importSampleQueries'];
|
385
266
|
for (const methodName of sampleQueryServiceStubMethods) {
|
386
267
|
const callPromise = this.sampleQueryServiceStub.then(stub => (...args) => {
|
387
268
|
if (this._terminated) {
|
@@ -406,8 +287,7 @@ class SampleQueryServiceClient {
|
|
406
287
|
* @returns {string} The DNS address for this service.
|
407
288
|
*/
|
408
289
|
static get servicePath() {
|
409
|
-
if (typeof process === 'object' &&
|
410
|
-
typeof process.emitWarning === 'function') {
|
290
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
411
291
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
412
292
|
}
|
413
293
|
return 'discoveryengine.googleapis.com';
|
@@ -418,8 +298,7 @@ class SampleQueryServiceClient {
|
|
418
298
|
* @returns {string} The DNS address for this service.
|
419
299
|
*/
|
420
300
|
static get apiEndpoint() {
|
421
|
-
if (typeof process === 'object' &&
|
422
|
-
typeof process.emitWarning === 'function') {
|
301
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
423
302
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
424
303
|
}
|
425
304
|
return 'discoveryengine.googleapis.com';
|
@@ -447,7 +326,9 @@ class SampleQueryServiceClient {
|
|
447
326
|
* @returns {string[]} List of default scopes.
|
448
327
|
*/
|
449
328
|
static get scopes() {
|
450
|
-
return [
|
329
|
+
return [
|
330
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
331
|
+
];
|
451
332
|
}
|
452
333
|
/**
|
453
334
|
* Return the project ID used by this class.
|
@@ -473,13 +354,10 @@ class SampleQueryServiceClient {
|
|
473
354
|
options = options || {};
|
474
355
|
options.otherArgs = options.otherArgs || {};
|
475
356
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
476
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
477
|
-
|
478
|
-
name: request.name ?? '',
|
479
|
-
});
|
480
|
-
this.initialize().catch(err => {
|
481
|
-
throw err;
|
357
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
358
|
+
'name': request.name ?? '',
|
482
359
|
});
|
360
|
+
this.initialize().catch(err => { throw err; });
|
483
361
|
this._log.info('getSampleQuery request %j', request);
|
484
362
|
const wrappedCallback = callback
|
485
363
|
? (error, response, options, rawResponse) => {
|
@@ -487,11 +365,16 @@ class SampleQueryServiceClient {
|
|
487
365
|
callback(error, response, options, rawResponse); // We verified callback above.
|
488
366
|
}
|
489
367
|
: undefined;
|
490
|
-
return this.innerApiCalls
|
491
|
-
.getSampleQuery(request, options, wrappedCallback)
|
368
|
+
return this.innerApiCalls.getSampleQuery(request, options, wrappedCallback)
|
492
369
|
?.then(([response, options, rawResponse]) => {
|
493
370
|
this._log.info('getSampleQuery response %j', response);
|
494
371
|
return [response, options, rawResponse];
|
372
|
+
}).catch((error) => {
|
373
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
374
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
375
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
376
|
+
}
|
377
|
+
throw error;
|
495
378
|
});
|
496
379
|
}
|
497
380
|
createSampleQuery(request, optionsOrCallback, callback) {
|
@@ -507,13 +390,10 @@ class SampleQueryServiceClient {
|
|
507
390
|
options = options || {};
|
508
391
|
options.otherArgs = options.otherArgs || {};
|
509
392
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
510
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
511
|
-
|
512
|
-
parent: request.parent ?? '',
|
513
|
-
});
|
514
|
-
this.initialize().catch(err => {
|
515
|
-
throw err;
|
393
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
394
|
+
'parent': request.parent ?? '',
|
516
395
|
});
|
396
|
+
this.initialize().catch(err => { throw err; });
|
517
397
|
this._log.info('createSampleQuery request %j', request);
|
518
398
|
const wrappedCallback = callback
|
519
399
|
? (error, response, options, rawResponse) => {
|
@@ -521,11 +401,16 @@ class SampleQueryServiceClient {
|
|
521
401
|
callback(error, response, options, rawResponse); // We verified callback above.
|
522
402
|
}
|
523
403
|
: undefined;
|
524
|
-
return this.innerApiCalls
|
525
|
-
.createSampleQuery(request, options, wrappedCallback)
|
404
|
+
return this.innerApiCalls.createSampleQuery(request, options, wrappedCallback)
|
526
405
|
?.then(([response, options, rawResponse]) => {
|
527
406
|
this._log.info('createSampleQuery response %j', response);
|
528
407
|
return [response, options, rawResponse];
|
408
|
+
}).catch((error) => {
|
409
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
410
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
411
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
412
|
+
}
|
413
|
+
throw error;
|
529
414
|
});
|
530
415
|
}
|
531
416
|
updateSampleQuery(request, optionsOrCallback, callback) {
|
@@ -541,13 +426,10 @@ class SampleQueryServiceClient {
|
|
541
426
|
options = options || {};
|
542
427
|
options.otherArgs = options.otherArgs || {};
|
543
428
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
544
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
545
|
-
|
546
|
-
'sample_query.name': request.sampleQuery.name ?? '',
|
547
|
-
});
|
548
|
-
this.initialize().catch(err => {
|
549
|
-
throw err;
|
429
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
430
|
+
'sample_query.name': request.sampleQuery.name ?? '',
|
550
431
|
});
|
432
|
+
this.initialize().catch(err => { throw err; });
|
551
433
|
this._log.info('updateSampleQuery request %j', request);
|
552
434
|
const wrappedCallback = callback
|
553
435
|
? (error, response, options, rawResponse) => {
|
@@ -555,11 +437,16 @@ class SampleQueryServiceClient {
|
|
555
437
|
callback(error, response, options, rawResponse); // We verified callback above.
|
556
438
|
}
|
557
439
|
: undefined;
|
558
|
-
return this.innerApiCalls
|
559
|
-
.updateSampleQuery(request, options, wrappedCallback)
|
440
|
+
return this.innerApiCalls.updateSampleQuery(request, options, wrappedCallback)
|
560
441
|
?.then(([response, options, rawResponse]) => {
|
561
442
|
this._log.info('updateSampleQuery response %j', response);
|
562
443
|
return [response, options, rawResponse];
|
444
|
+
}).catch((error) => {
|
445
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
446
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
447
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
448
|
+
}
|
449
|
+
throw error;
|
563
450
|
});
|
564
451
|
}
|
565
452
|
deleteSampleQuery(request, optionsOrCallback, callback) {
|
@@ -575,13 +462,10 @@ class SampleQueryServiceClient {
|
|
575
462
|
options = options || {};
|
576
463
|
options.otherArgs = options.otherArgs || {};
|
577
464
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
578
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
579
|
-
|
580
|
-
name: request.name ?? '',
|
581
|
-
});
|
582
|
-
this.initialize().catch(err => {
|
583
|
-
throw err;
|
465
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
466
|
+
'name': request.name ?? '',
|
584
467
|
});
|
468
|
+
this.initialize().catch(err => { throw err; });
|
585
469
|
this._log.info('deleteSampleQuery request %j', request);
|
586
470
|
const wrappedCallback = callback
|
587
471
|
? (error, response, options, rawResponse) => {
|
@@ -589,11 +473,16 @@ class SampleQueryServiceClient {
|
|
589
473
|
callback(error, response, options, rawResponse); // We verified callback above.
|
590
474
|
}
|
591
475
|
: undefined;
|
592
|
-
return this.innerApiCalls
|
593
|
-
.deleteSampleQuery(request, options, wrappedCallback)
|
476
|
+
return this.innerApiCalls.deleteSampleQuery(request, options, wrappedCallback)
|
594
477
|
?.then(([response, options, rawResponse]) => {
|
595
478
|
this._log.info('deleteSampleQuery response %j', response);
|
596
479
|
return [response, options, rawResponse];
|
480
|
+
}).catch((error) => {
|
481
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
482
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
483
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
484
|
+
}
|
485
|
+
throw error;
|
597
486
|
});
|
598
487
|
}
|
599
488
|
importSampleQueries(request, optionsOrCallback, callback) {
|
@@ -609,13 +498,10 @@ class SampleQueryServiceClient {
|
|
609
498
|
options = options || {};
|
610
499
|
options.otherArgs = options.otherArgs || {};
|
611
500
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
612
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
613
|
-
|
614
|
-
parent: request.parent ?? '',
|
615
|
-
});
|
616
|
-
this.initialize().catch(err => {
|
617
|
-
throw err;
|
501
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
502
|
+
'parent': request.parent ?? '',
|
618
503
|
});
|
504
|
+
this.initialize().catch(err => { throw err; });
|
619
505
|
const wrappedCallback = callback
|
620
506
|
? (error, response, rawResponse, _) => {
|
621
507
|
this._log.info('importSampleQueries response %j', rawResponse);
|
@@ -623,8 +509,7 @@ class SampleQueryServiceClient {
|
|
623
509
|
}
|
624
510
|
: undefined;
|
625
511
|
this._log.info('importSampleQueries request %j', request);
|
626
|
-
return this.innerApiCalls
|
627
|
-
.importSampleQueries(request, options, wrappedCallback)
|
512
|
+
return this.innerApiCalls.importSampleQueries(request, options, wrappedCallback)
|
628
513
|
?.then(([response, rawResponse, _]) => {
|
629
514
|
this._log.info('importSampleQueries response %j', rawResponse);
|
630
515
|
return [response, rawResponse, _];
|
@@ -661,13 +546,10 @@ class SampleQueryServiceClient {
|
|
661
546
|
options = options || {};
|
662
547
|
options.otherArgs = options.otherArgs || {};
|
663
548
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
664
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
665
|
-
|
666
|
-
parent: request.parent ?? '',
|
667
|
-
});
|
668
|
-
this.initialize().catch(err => {
|
669
|
-
throw err;
|
549
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
550
|
+
'parent': request.parent ?? '',
|
670
551
|
});
|
552
|
+
this.initialize().catch(err => { throw err; });
|
671
553
|
const wrappedCallback = callback
|
672
554
|
? (error, values, nextPageRequest, rawResponse) => {
|
673
555
|
this._log.info('listSampleQueries values %j', values);
|
@@ -728,15 +610,12 @@ class SampleQueryServiceClient {
|
|
728
610
|
options = options || {};
|
729
611
|
options.otherArgs = options.otherArgs || {};
|
730
612
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
731
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
732
|
-
|
733
|
-
|
734
|
-
});
|
613
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
614
|
+
'parent': request.parent ?? '',
|
615
|
+
});
|
735
616
|
const defaultCallSettings = this._defaults['listSampleQueries'];
|
736
617
|
const callSettings = defaultCallSettings.merge(options);
|
737
|
-
this.initialize().catch(err => {
|
738
|
-
throw err;
|
739
|
-
});
|
618
|
+
this.initialize().catch(err => { throw err; });
|
740
619
|
this._log.info('listSampleQueries stream %j', request);
|
741
620
|
return this.descriptors.page.listSampleQueries.createStream(this.innerApiCalls.listSampleQueries, request, callSettings);
|
742
621
|
}
|
@@ -789,103 +668,100 @@ class SampleQueryServiceClient {
|
|
789
668
|
options = options || {};
|
790
669
|
options.otherArgs = options.otherArgs || {};
|
791
670
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
792
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
793
|
-
|
794
|
-
|
795
|
-
});
|
671
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
672
|
+
'parent': request.parent ?? '',
|
673
|
+
});
|
796
674
|
const defaultCallSettings = this._defaults['listSampleQueries'];
|
797
675
|
const callSettings = defaultCallSettings.merge(options);
|
798
|
-
this.initialize().catch(err => {
|
799
|
-
throw err;
|
800
|
-
});
|
676
|
+
this.initialize().catch(err => { throw err; });
|
801
677
|
this._log.info('listSampleQueries iterate %j', request);
|
802
678
|
return this.descriptors.page.listSampleQueries.asyncIterate(this.innerApiCalls['listSampleQueries'], request, callSettings);
|
803
679
|
}
|
804
680
|
/**
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
681
|
+
* Gets information about a location.
|
682
|
+
*
|
683
|
+
* @param {Object} request
|
684
|
+
* The request object that will be sent.
|
685
|
+
* @param {string} request.name
|
686
|
+
* Resource name for the location.
|
687
|
+
* @param {object} [options]
|
688
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
689
|
+
* @returns {Promise} - The promise which resolves to an array.
|
690
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
691
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
692
|
+
* for more details and examples.
|
693
|
+
* @example
|
694
|
+
* ```
|
695
|
+
* const [response] = await client.getLocation(request);
|
696
|
+
* ```
|
697
|
+
*/
|
822
698
|
getLocation(request, options, callback) {
|
823
699
|
return this.locationsClient.getLocation(request, options, callback);
|
824
700
|
}
|
825
701
|
/**
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
702
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
703
|
+
*
|
704
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
705
|
+
* @param {Object} request
|
706
|
+
* The request object that will be sent.
|
707
|
+
* @param {string} request.name
|
708
|
+
* The resource that owns the locations collection, if applicable.
|
709
|
+
* @param {string} request.filter
|
710
|
+
* The standard list filter.
|
711
|
+
* @param {number} request.pageSize
|
712
|
+
* The standard list page size.
|
713
|
+
* @param {string} request.pageToken
|
714
|
+
* The standard list page token.
|
715
|
+
* @param {object} [options]
|
716
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
717
|
+
* @returns {Object}
|
718
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
719
|
+
* When you iterate the returned iterable, each element will be an object representing
|
720
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
721
|
+
* so you can stop the iteration when you don't need more results.
|
722
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
723
|
+
* for more details and examples.
|
724
|
+
* @example
|
725
|
+
* ```
|
726
|
+
* const iterable = client.listLocationsAsync(request);
|
727
|
+
* for await (const response of iterable) {
|
728
|
+
* // process response
|
729
|
+
* }
|
730
|
+
* ```
|
731
|
+
*/
|
856
732
|
listLocationsAsync(request, options) {
|
857
733
|
return this.locationsClient.listLocationsAsync(request, options);
|
858
734
|
}
|
859
735
|
/**
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
736
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
737
|
+
* method to poll the operation result at intervals as recommended by the API
|
738
|
+
* service.
|
739
|
+
*
|
740
|
+
* @param {Object} request - The request object that will be sent.
|
741
|
+
* @param {string} request.name - The name of the operation resource.
|
742
|
+
* @param {Object=} options
|
743
|
+
* Optional parameters. You can override the default settings for this call,
|
744
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
745
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
746
|
+
* for the details.
|
747
|
+
* @param {function(?Error, ?Object)=} callback
|
748
|
+
* The function which will be called with the result of the API call.
|
749
|
+
*
|
750
|
+
* The second parameter to the callback is an object representing
|
751
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
752
|
+
* @return {Promise} - The promise which resolves to an array.
|
753
|
+
* The first element of the array is an object representing
|
754
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
755
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
756
|
+
*
|
757
|
+
* @example
|
758
|
+
* ```
|
759
|
+
* const client = longrunning.operationsClient();
|
760
|
+
* const name = '';
|
761
|
+
* const [response] = await client.getOperation({name});
|
762
|
+
* // doThingsWith(response)
|
763
|
+
* ```
|
764
|
+
*/
|
889
765
|
getOperation(request, optionsOrCallback, callback) {
|
890
766
|
let options;
|
891
767
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1060,8 +936,7 @@ class SampleQueryServiceClient {
|
|
1060
936
|
* @returns {string} A string representing the project.
|
1061
937
|
*/
|
1062
938
|
matchProjectFromAclConfigName(aclConfigName) {
|
1063
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1064
|
-
.project;
|
939
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1065
940
|
}
|
1066
941
|
/**
|
1067
942
|
* Parse the location from AclConfig resource.
|
@@ -1071,8 +946,7 @@ class SampleQueryServiceClient {
|
|
1071
946
|
* @returns {string} A string representing the location.
|
1072
947
|
*/
|
1073
948
|
matchLocationFromAclConfigName(aclConfigName) {
|
1074
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1075
|
-
.location;
|
949
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1076
950
|
}
|
1077
951
|
/**
|
1078
952
|
* Return a fully-qualified engine resource name string.
|
@@ -1154,8 +1028,7 @@ class SampleQueryServiceClient {
|
|
1154
1028
|
* @returns {string} A string representing the project.
|
1155
1029
|
*/
|
1156
1030
|
matchProjectFromEvaluationName(evaluationName) {
|
1157
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1158
|
-
.project;
|
1031
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1159
1032
|
}
|
1160
1033
|
/**
|
1161
1034
|
* Parse the location from Evaluation resource.
|
@@ -1165,8 +1038,7 @@ class SampleQueryServiceClient {
|
|
1165
1038
|
* @returns {string} A string representing the location.
|
1166
1039
|
*/
|
1167
1040
|
matchLocationFromEvaluationName(evaluationName) {
|
1168
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1169
|
-
.location;
|
1041
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1170
1042
|
}
|
1171
1043
|
/**
|
1172
1044
|
* Parse the evaluation from Evaluation resource.
|
@@ -1176,8 +1048,7 @@ class SampleQueryServiceClient {
|
|
1176
1048
|
* @returns {string} A string representing the evaluation.
|
1177
1049
|
*/
|
1178
1050
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1179
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1180
|
-
.evaluation;
|
1051
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1181
1052
|
}
|
1182
1053
|
/**
|
1183
1054
|
* Return a fully-qualified project resource name string.
|
@@ -3244,8 +3115,7 @@ class SampleQueryServiceClient {
|
|
3244
3115
|
* @returns {string} A string representing the project.
|
3245
3116
|
*/
|
3246
3117
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3247
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3248
|
-
.project;
|
3118
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3249
3119
|
}
|
3250
3120
|
/**
|
3251
3121
|
* Parse the location from SampleQuery resource.
|
@@ -3255,8 +3125,7 @@ class SampleQueryServiceClient {
|
|
3255
3125
|
* @returns {string} A string representing the location.
|
3256
3126
|
*/
|
3257
3127
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3258
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3259
|
-
.location;
|
3128
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3260
3129
|
}
|
3261
3130
|
/**
|
3262
3131
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3266,8 +3135,7 @@ class SampleQueryServiceClient {
|
|
3266
3135
|
* @returns {string} A string representing the sample_query_set.
|
3267
3136
|
*/
|
3268
3137
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3269
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3270
|
-
.sample_query_set;
|
3138
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3271
3139
|
}
|
3272
3140
|
/**
|
3273
3141
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3277,8 +3145,7 @@ class SampleQueryServiceClient {
|
|
3277
3145
|
* @returns {string} A string representing the sample_query.
|
3278
3146
|
*/
|
3279
3147
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3280
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3281
|
-
.sample_query;
|
3148
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3282
3149
|
}
|
3283
3150
|
/**
|
3284
3151
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3337,8 +3204,8 @@ class SampleQueryServiceClient {
|
|
3337
3204
|
this._log.info('ending gRPC channel');
|
3338
3205
|
this._terminated = true;
|
3339
3206
|
stub.close();
|
3340
|
-
this.locationsClient.close();
|
3341
|
-
this.operationsClient.close();
|
3207
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3208
|
+
void this.operationsClient.close();
|
3342
3209
|
});
|
3343
3210
|
}
|
3344
3211
|
return Promise.resolve();
|