@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
@@ -100,26 +100,17 @@ class ControlServiceClient {
|
|
100
100
|
constructor(opts, gaxInstance) {
|
101
101
|
// Ensure that options include all the required fields.
|
102
102
|
const staticMembers = this.constructor;
|
103
|
-
if (opts?.universe_domain &&
|
104
|
-
opts?.universeDomain &&
|
105
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
103
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
106
104
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
107
105
|
}
|
108
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
109
|
-
|
110
|
-
: undefined;
|
111
|
-
this._universeDomain =
|
112
|
-
opts?.universeDomain ??
|
113
|
-
opts?.universe_domain ??
|
114
|
-
universeDomainEnvVar ??
|
115
|
-
'googleapis.com';
|
106
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
107
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
116
108
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
117
109
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
118
110
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
119
111
|
const port = opts?.port || staticMembers.port;
|
120
112
|
const clientConfig = opts?.clientConfig ?? {};
|
121
|
-
const fallback = opts?.fallback ??
|
122
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
113
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
123
114
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
124
115
|
// Request numeric enum values if REST transport is used.
|
125
116
|
opts.numericEnums = true;
|
@@ -149,7 +140,10 @@ class ControlServiceClient {
|
|
149
140
|
}
|
150
141
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
151
142
|
// Determine the client header string.
|
152
|
-
const clientHeader = [
|
143
|
+
const clientHeader = [
|
144
|
+
`gax/${this._gaxModule.version}`,
|
145
|
+
`gapic/${version}`,
|
146
|
+
];
|
153
147
|
if (typeof process === 'object' && 'versions' in process) {
|
154
148
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
155
149
|
}
|
@@ -214,7 +208,7 @@ class ControlServiceClient {
|
|
214
208
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
215
209
|
// pages). Denote the keys used for pagination and results.
|
216
210
|
this.descriptors.page = {
|
217
|
-
listControls: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controls')
|
211
|
+
listControls: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'controls')
|
218
212
|
};
|
219
213
|
// Put together the default options sent with requests.
|
220
214
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.ControlService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -243,20 +237,13 @@ class ControlServiceClient {
|
|
243
237
|
}
|
244
238
|
// Put together the "service stub" for
|
245
239
|
// google.cloud.discoveryengine.v1alpha.ControlService.
|
246
|
-
this.controlServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
.ControlService, this._opts, this._providedCustomServicePath);
|
240
|
+
this.controlServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
241
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.ControlService') :
|
242
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
243
|
+
this._protos.google.cloud.discoveryengine.v1alpha.ControlService, this._opts, this._providedCustomServicePath);
|
251
244
|
// Iterate over each of the methods that the service provides
|
252
245
|
// and create an API call method for each.
|
253
|
-
const controlServiceStubMethods = [
|
254
|
-
'createControl',
|
255
|
-
'deleteControl',
|
256
|
-
'updateControl',
|
257
|
-
'getControl',
|
258
|
-
'listControls',
|
259
|
-
];
|
246
|
+
const controlServiceStubMethods = ['createControl', 'deleteControl', 'updateControl', 'getControl', 'listControls'];
|
260
247
|
for (const methodName of controlServiceStubMethods) {
|
261
248
|
const callPromise = this.controlServiceStub.then(stub => (...args) => {
|
262
249
|
if (this._terminated) {
|
@@ -267,7 +254,8 @@ class ControlServiceClient {
|
|
267
254
|
}, (err) => () => {
|
268
255
|
throw err;
|
269
256
|
});
|
270
|
-
const descriptor = this.descriptors.page[methodName] ||
|
257
|
+
const descriptor = this.descriptors.page[methodName] ||
|
258
|
+
undefined;
|
271
259
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
272
260
|
this.innerApiCalls[methodName] = apiCall;
|
273
261
|
}
|
@@ -279,8 +267,7 @@ class ControlServiceClient {
|
|
279
267
|
* @returns {string} The DNS address for this service.
|
280
268
|
*/
|
281
269
|
static get servicePath() {
|
282
|
-
if (typeof process === 'object' &&
|
283
|
-
typeof process.emitWarning === 'function') {
|
270
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
284
271
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
285
272
|
}
|
286
273
|
return 'discoveryengine.googleapis.com';
|
@@ -291,8 +278,7 @@ class ControlServiceClient {
|
|
291
278
|
* @returns {string} The DNS address for this service.
|
292
279
|
*/
|
293
280
|
static get apiEndpoint() {
|
294
|
-
if (typeof process === 'object' &&
|
295
|
-
typeof process.emitWarning === 'function') {
|
281
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
296
282
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
297
283
|
}
|
298
284
|
return 'discoveryengine.googleapis.com';
|
@@ -320,7 +306,9 @@ class ControlServiceClient {
|
|
320
306
|
* @returns {string[]} List of default scopes.
|
321
307
|
*/
|
322
308
|
static get scopes() {
|
323
|
-
return [
|
309
|
+
return [
|
310
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
311
|
+
];
|
324
312
|
}
|
325
313
|
/**
|
326
314
|
* Return the project ID used by this class.
|
@@ -346,13 +334,10 @@ class ControlServiceClient {
|
|
346
334
|
options = options || {};
|
347
335
|
options.otherArgs = options.otherArgs || {};
|
348
336
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
349
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
350
|
-
|
351
|
-
parent: request.parent ?? '',
|
352
|
-
});
|
353
|
-
this.initialize().catch(err => {
|
354
|
-
throw err;
|
337
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
338
|
+
'parent': request.parent ?? '',
|
355
339
|
});
|
340
|
+
this.initialize().catch(err => { throw err; });
|
356
341
|
this._log.info('createControl request %j', request);
|
357
342
|
const wrappedCallback = callback
|
358
343
|
? (error, response, options, rawResponse) => {
|
@@ -360,8 +345,7 @@ class ControlServiceClient {
|
|
360
345
|
callback(error, response, options, rawResponse); // We verified callback above.
|
361
346
|
}
|
362
347
|
: undefined;
|
363
|
-
return this.innerApiCalls
|
364
|
-
.createControl(request, options, wrappedCallback)
|
348
|
+
return this.innerApiCalls.createControl(request, options, wrappedCallback)
|
365
349
|
?.then(([response, options, rawResponse]) => {
|
366
350
|
this._log.info('createControl response %j', response);
|
367
351
|
return [response, options, rawResponse];
|
@@ -380,13 +364,10 @@ class ControlServiceClient {
|
|
380
364
|
options = options || {};
|
381
365
|
options.otherArgs = options.otherArgs || {};
|
382
366
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
383
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
384
|
-
|
385
|
-
name: request.name ?? '',
|
386
|
-
});
|
387
|
-
this.initialize().catch(err => {
|
388
|
-
throw err;
|
367
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
368
|
+
'name': request.name ?? '',
|
389
369
|
});
|
370
|
+
this.initialize().catch(err => { throw err; });
|
390
371
|
this._log.info('deleteControl request %j', request);
|
391
372
|
const wrappedCallback = callback
|
392
373
|
? (error, response, options, rawResponse) => {
|
@@ -394,8 +375,7 @@ class ControlServiceClient {
|
|
394
375
|
callback(error, response, options, rawResponse); // We verified callback above.
|
395
376
|
}
|
396
377
|
: undefined;
|
397
|
-
return this.innerApiCalls
|
398
|
-
.deleteControl(request, options, wrappedCallback)
|
378
|
+
return this.innerApiCalls.deleteControl(request, options, wrappedCallback)
|
399
379
|
?.then(([response, options, rawResponse]) => {
|
400
380
|
this._log.info('deleteControl response %j', response);
|
401
381
|
return [response, options, rawResponse];
|
@@ -414,13 +394,10 @@ class ControlServiceClient {
|
|
414
394
|
options = options || {};
|
415
395
|
options.otherArgs = options.otherArgs || {};
|
416
396
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
417
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
418
|
-
|
419
|
-
'control.name': request.control.name ?? '',
|
420
|
-
});
|
421
|
-
this.initialize().catch(err => {
|
422
|
-
throw err;
|
397
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
398
|
+
'control.name': request.control.name ?? '',
|
423
399
|
});
|
400
|
+
this.initialize().catch(err => { throw err; });
|
424
401
|
this._log.info('updateControl request %j', request);
|
425
402
|
const wrappedCallback = callback
|
426
403
|
? (error, response, options, rawResponse) => {
|
@@ -428,8 +405,7 @@ class ControlServiceClient {
|
|
428
405
|
callback(error, response, options, rawResponse); // We verified callback above.
|
429
406
|
}
|
430
407
|
: undefined;
|
431
|
-
return this.innerApiCalls
|
432
|
-
.updateControl(request, options, wrappedCallback)
|
408
|
+
return this.innerApiCalls.updateControl(request, options, wrappedCallback)
|
433
409
|
?.then(([response, options, rawResponse]) => {
|
434
410
|
this._log.info('updateControl response %j', response);
|
435
411
|
return [response, options, rawResponse];
|
@@ -448,13 +424,10 @@ class ControlServiceClient {
|
|
448
424
|
options = options || {};
|
449
425
|
options.otherArgs = options.otherArgs || {};
|
450
426
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
451
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
452
|
-
|
453
|
-
name: request.name ?? '',
|
454
|
-
});
|
455
|
-
this.initialize().catch(err => {
|
456
|
-
throw err;
|
427
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
428
|
+
'name': request.name ?? '',
|
457
429
|
});
|
430
|
+
this.initialize().catch(err => { throw err; });
|
458
431
|
this._log.info('getControl request %j', request);
|
459
432
|
const wrappedCallback = callback
|
460
433
|
? (error, response, options, rawResponse) => {
|
@@ -462,8 +435,7 @@ class ControlServiceClient {
|
|
462
435
|
callback(error, response, options, rawResponse); // We verified callback above.
|
463
436
|
}
|
464
437
|
: undefined;
|
465
|
-
return this.innerApiCalls
|
466
|
-
.getControl(request, options, wrappedCallback)
|
438
|
+
return this.innerApiCalls.getControl(request, options, wrappedCallback)
|
467
439
|
?.then(([response, options, rawResponse]) => {
|
468
440
|
this._log.info('getControl response %j', response);
|
469
441
|
return [response, options, rawResponse];
|
@@ -482,13 +454,10 @@ class ControlServiceClient {
|
|
482
454
|
options = options || {};
|
483
455
|
options.otherArgs = options.otherArgs || {};
|
484
456
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
485
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
486
|
-
|
487
|
-
parent: request.parent ?? '',
|
488
|
-
});
|
489
|
-
this.initialize().catch(err => {
|
490
|
-
throw err;
|
457
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
458
|
+
'parent': request.parent ?? '',
|
491
459
|
});
|
460
|
+
this.initialize().catch(err => { throw err; });
|
492
461
|
const wrappedCallback = callback
|
493
462
|
? (error, values, nextPageRequest, rawResponse) => {
|
494
463
|
this._log.info('listControls values %j', values);
|
@@ -540,15 +509,12 @@ class ControlServiceClient {
|
|
540
509
|
options = options || {};
|
541
510
|
options.otherArgs = options.otherArgs || {};
|
542
511
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
543
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
544
|
-
|
545
|
-
|
546
|
-
});
|
512
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
513
|
+
'parent': request.parent ?? '',
|
514
|
+
});
|
547
515
|
const defaultCallSettings = this._defaults['listControls'];
|
548
516
|
const callSettings = defaultCallSettings.merge(options);
|
549
|
-
this.initialize().catch(err => {
|
550
|
-
throw err;
|
551
|
-
});
|
517
|
+
this.initialize().catch(err => { throw err; });
|
552
518
|
this._log.info('listControls stream %j', request);
|
553
519
|
return this.descriptors.page.listControls.createStream(this.innerApiCalls.listControls, request, callSettings);
|
554
520
|
}
|
@@ -592,70 +558,67 @@ class ControlServiceClient {
|
|
592
558
|
options = options || {};
|
593
559
|
options.otherArgs = options.otherArgs || {};
|
594
560
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
595
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
596
|
-
|
597
|
-
|
598
|
-
});
|
561
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
562
|
+
'parent': request.parent ?? '',
|
563
|
+
});
|
599
564
|
const defaultCallSettings = this._defaults['listControls'];
|
600
565
|
const callSettings = defaultCallSettings.merge(options);
|
601
|
-
this.initialize().catch(err => {
|
602
|
-
throw err;
|
603
|
-
});
|
566
|
+
this.initialize().catch(err => { throw err; });
|
604
567
|
this._log.info('listControls iterate %j', request);
|
605
568
|
return this.descriptors.page.listControls.asyncIterate(this.innerApiCalls['listControls'], request, callSettings);
|
606
569
|
}
|
607
570
|
/**
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
571
|
+
* Gets information about a location.
|
572
|
+
*
|
573
|
+
* @param {Object} request
|
574
|
+
* The request object that will be sent.
|
575
|
+
* @param {string} request.name
|
576
|
+
* Resource name for the location.
|
577
|
+
* @param {object} [options]
|
578
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
579
|
+
* @returns {Promise} - The promise which resolves to an array.
|
580
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
581
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
582
|
+
* for more details and examples.
|
583
|
+
* @example
|
584
|
+
* ```
|
585
|
+
* const [response] = await client.getLocation(request);
|
586
|
+
* ```
|
587
|
+
*/
|
625
588
|
getLocation(request, options, callback) {
|
626
589
|
return this.locationsClient.getLocation(request, options, callback);
|
627
590
|
}
|
628
591
|
/**
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
592
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
593
|
+
*
|
594
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
595
|
+
* @param {Object} request
|
596
|
+
* The request object that will be sent.
|
597
|
+
* @param {string} request.name
|
598
|
+
* The resource that owns the locations collection, if applicable.
|
599
|
+
* @param {string} request.filter
|
600
|
+
* The standard list filter.
|
601
|
+
* @param {number} request.pageSize
|
602
|
+
* The standard list page size.
|
603
|
+
* @param {string} request.pageToken
|
604
|
+
* The standard list page token.
|
605
|
+
* @param {object} [options]
|
606
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
607
|
+
* @returns {Object}
|
608
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
609
|
+
* When you iterate the returned iterable, each element will be an object representing
|
610
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
611
|
+
* so you can stop the iteration when you don't need more results.
|
612
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
613
|
+
* for more details and examples.
|
614
|
+
* @example
|
615
|
+
* ```
|
616
|
+
* const iterable = client.listLocationsAsync(request);
|
617
|
+
* for await (const response of iterable) {
|
618
|
+
* // process response
|
619
|
+
* }
|
620
|
+
* ```
|
621
|
+
*/
|
659
622
|
listLocationsAsync(request, options) {
|
660
623
|
return this.locationsClient.listLocationsAsync(request, options);
|
661
624
|
}
|
@@ -683,8 +646,7 @@ class ControlServiceClient {
|
|
683
646
|
* @returns {string} A string representing the project.
|
684
647
|
*/
|
685
648
|
matchProjectFromAclConfigName(aclConfigName) {
|
686
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
687
|
-
.project;
|
649
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
688
650
|
}
|
689
651
|
/**
|
690
652
|
* Parse the location from AclConfig resource.
|
@@ -694,8 +656,7 @@ class ControlServiceClient {
|
|
694
656
|
* @returns {string} A string representing the location.
|
695
657
|
*/
|
696
658
|
matchLocationFromAclConfigName(aclConfigName) {
|
697
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
698
|
-
.location;
|
659
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
699
660
|
}
|
700
661
|
/**
|
701
662
|
* Return a fully-qualified engine resource name string.
|
@@ -777,8 +738,7 @@ class ControlServiceClient {
|
|
777
738
|
* @returns {string} A string representing the project.
|
778
739
|
*/
|
779
740
|
matchProjectFromEvaluationName(evaluationName) {
|
780
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
781
|
-
.project;
|
741
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
782
742
|
}
|
783
743
|
/**
|
784
744
|
* Parse the location from Evaluation resource.
|
@@ -788,8 +748,7 @@ class ControlServiceClient {
|
|
788
748
|
* @returns {string} A string representing the location.
|
789
749
|
*/
|
790
750
|
matchLocationFromEvaluationName(evaluationName) {
|
791
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
792
|
-
.location;
|
751
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
793
752
|
}
|
794
753
|
/**
|
795
754
|
* Parse the evaluation from Evaluation resource.
|
@@ -799,8 +758,7 @@ class ControlServiceClient {
|
|
799
758
|
* @returns {string} A string representing the evaluation.
|
800
759
|
*/
|
801
760
|
matchEvaluationFromEvaluationName(evaluationName) {
|
802
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
803
|
-
.evaluation;
|
761
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
804
762
|
}
|
805
763
|
/**
|
806
764
|
* Return a fully-qualified location resource name string.
|
@@ -2900,8 +2858,7 @@ class ControlServiceClient {
|
|
2900
2858
|
* @returns {string} A string representing the project.
|
2901
2859
|
*/
|
2902
2860
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
2903
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2904
|
-
.project;
|
2861
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
2905
2862
|
}
|
2906
2863
|
/**
|
2907
2864
|
* Parse the location from SampleQuery resource.
|
@@ -2911,8 +2868,7 @@ class ControlServiceClient {
|
|
2911
2868
|
* @returns {string} A string representing the location.
|
2912
2869
|
*/
|
2913
2870
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
2914
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2915
|
-
.location;
|
2871
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
2916
2872
|
}
|
2917
2873
|
/**
|
2918
2874
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -2922,8 +2878,7 @@ class ControlServiceClient {
|
|
2922
2878
|
* @returns {string} A string representing the sample_query_set.
|
2923
2879
|
*/
|
2924
2880
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
2925
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2926
|
-
.sample_query_set;
|
2881
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
2927
2882
|
}
|
2928
2883
|
/**
|
2929
2884
|
* Parse the sample_query from SampleQuery resource.
|
@@ -2933,8 +2888,7 @@ class ControlServiceClient {
|
|
2933
2888
|
* @returns {string} A string representing the sample_query.
|
2934
2889
|
*/
|
2935
2890
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
2936
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
2937
|
-
.sample_query;
|
2891
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
2938
2892
|
}
|
2939
2893
|
/**
|
2940
2894
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -2993,7 +2947,7 @@ class ControlServiceClient {
|
|
2993
2947
|
this._log.info('ending gRPC channel');
|
2994
2948
|
this._terminated = true;
|
2995
2949
|
stub.close();
|
2996
|
-
this.locationsClient.close();
|
2950
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2997
2951
|
});
|
2998
2952
|
}
|
2999
2953
|
return Promise.resolve();
|