@google-cloud/storage-control 0.6.1 → 0.8.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 +7 -0
- package/build/protos/google/storage/v2/storage.proto +3166 -0
- package/build/protos/protos.d.ts +11304 -40
- package/build/protos/protos.js +30882 -22
- package/build/protos/protos.json +4507 -28
- package/build/src/index.d.ts +2 -3
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/storage_control_client.d.ts +2035 -0
- package/build/src/storage_control_client.js +2440 -0
- package/build/src/storage_control_client.js.map +1 -0
- package/build/src/util/ast_utils.d.ts +22 -0
- package/build/src/util/ast_utils.js +356 -0
- package/build/src/util/ast_utils.js.map +1 -0
- package/build/src/util/index_fix_utils.d.ts +15 -0
- package/build/src/util/index_fix_utils.js +86 -0
- package/build/src/util/index_fix_utils.js.map +1 -0
- package/build/src/util/proto_utils.d.ts +13 -0
- package/build/src/util/proto_utils.js +53 -0
- package/build/src/util/proto_utils.js.map +1 -0
- package/build/src/util/storage_control_utils.d.ts +1 -0
- package/build/src/util/storage_control_utils.js +31 -0
- package/build/src/util/storage_control_utils.js.map +1 -0
- package/build/src/util/uber_client_builder.d.ts +12 -0
- package/build/src/util/uber_client_builder.js +187 -0
- package/build/src/util/uber_client_builder.js.map +1 -0
- package/build/src/v2/index.d.ts +1 -0
- package/build/src/v2/index.js +4 -2
- package/build/src/v2/index.js.map +1 -1
- package/build/src/v2/storage_client.d.ts +614 -0
- package/build/src/v2/storage_client.js +911 -0
- package/build/src/v2/storage_client.js.map +1 -0
- package/build/src/v2/storage_client_config.json +65 -0
- package/build/src/v2/storage_control_client.d.ts +138 -138
- package/build/src/v2/storage_control_client.js +486 -232
- package/build/src/v2/storage_control_client.js.map +1 -1
- package/build/src/v2/storage_proto_list.json +3 -0
- package/package.json +4 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -99,17 +99,26 @@ class StorageControlClient {
|
|
|
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 &&
|
|
102
|
+
if (opts?.universe_domain &&
|
|
103
|
+
opts?.universeDomain &&
|
|
104
|
+
opts?.universe_domain !== opts?.universeDomain) {
|
|
103
105
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
104
106
|
}
|
|
105
|
-
const universeDomainEnvVar =
|
|
106
|
-
|
|
107
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
108
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
109
|
+
: undefined;
|
|
110
|
+
this._universeDomain =
|
|
111
|
+
opts?.universeDomain ??
|
|
112
|
+
opts?.universe_domain ??
|
|
113
|
+
universeDomainEnvVar ??
|
|
114
|
+
'googleapis.com';
|
|
107
115
|
this._servicePath = 'storage.' + this._universeDomain;
|
|
108
116
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
109
117
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
110
118
|
const port = opts?.port || staticMembers.port;
|
|
111
119
|
const clientConfig = opts?.clientConfig ?? {};
|
|
112
|
-
const fallback = opts?.fallback ??
|
|
120
|
+
const fallback = opts?.fallback ??
|
|
121
|
+
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
113
122
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
114
123
|
// Request numeric enum values if REST transport is used.
|
|
115
124
|
opts.numericEnums = true;
|
|
@@ -138,10 +147,7 @@ class StorageControlClient {
|
|
|
138
147
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
139
148
|
}
|
|
140
149
|
// Determine the client header string.
|
|
141
|
-
const clientHeader = [
|
|
142
|
-
`gax/${this._gaxModule.version}`,
|
|
143
|
-
`gapic/${version}`,
|
|
144
|
-
];
|
|
150
|
+
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
145
151
|
if (typeof process === 'object' && 'versions' in process) {
|
|
146
152
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
147
153
|
}
|
|
@@ -179,7 +185,7 @@ class StorageControlClient {
|
|
|
179
185
|
this.descriptors.page = {
|
|
180
186
|
listFolders: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'folders'),
|
|
181
187
|
listManagedFolders: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'managedFolders'),
|
|
182
|
-
listAnywhereCaches: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'anywhereCaches')
|
|
188
|
+
listAnywhereCaches: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'anywhereCaches'),
|
|
183
189
|
};
|
|
184
190
|
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
|
185
191
|
// This API contains "long-running operations", which return a
|
|
@@ -187,13 +193,15 @@ class StorageControlClient {
|
|
|
187
193
|
// rather than holding a request open.
|
|
188
194
|
const lroOptions = {
|
|
189
195
|
auth: this.auth,
|
|
190
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
|
196
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
|
191
197
|
};
|
|
192
198
|
if (opts.fallback) {
|
|
193
199
|
lroOptions.protoJson = protoFilesRoot;
|
|
194
200
|
lroOptions.httpRules = [];
|
|
195
201
|
}
|
|
196
|
-
this.operationsClient = this._gaxModule
|
|
202
|
+
this.operationsClient = this._gaxModule
|
|
203
|
+
.lro(lroOptions)
|
|
204
|
+
.operationsClient(opts);
|
|
197
205
|
const renameFolderResponse = protoFilesRoot.lookup('.google.storage.control.v2.Folder');
|
|
198
206
|
const renameFolderMetadata = protoFilesRoot.lookup('.google.storage.control.v2.RenameFolderMetadata');
|
|
199
207
|
const createAnywhereCacheResponse = protoFilesRoot.lookup('.google.storage.control.v2.AnywhereCache');
|
|
@@ -203,7 +211,7 @@ class StorageControlClient {
|
|
|
203
211
|
this.descriptors.longrunning = {
|
|
204
212
|
renameFolder: new this._gaxModule.LongrunningDescriptor(this.operationsClient, renameFolderResponse.decode.bind(renameFolderResponse), renameFolderMetadata.decode.bind(renameFolderMetadata)),
|
|
205
213
|
createAnywhereCache: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createAnywhereCacheResponse.decode.bind(createAnywhereCacheResponse), createAnywhereCacheMetadata.decode.bind(createAnywhereCacheMetadata)),
|
|
206
|
-
updateAnywhereCache: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateAnywhereCacheResponse.decode.bind(updateAnywhereCacheResponse), updateAnywhereCacheMetadata.decode.bind(updateAnywhereCacheMetadata))
|
|
214
|
+
updateAnywhereCache: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateAnywhereCacheResponse.decode.bind(updateAnywhereCacheResponse), updateAnywhereCacheMetadata.decode.bind(updateAnywhereCacheMetadata)),
|
|
207
215
|
};
|
|
208
216
|
// Put together the default options sent with requests.
|
|
209
217
|
this._defaults = this._gaxGrpc.constructSettings('google.storage.control.v2.StorageControl', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -232,13 +240,40 @@ class StorageControlClient {
|
|
|
232
240
|
}
|
|
233
241
|
// Put together the "service stub" for
|
|
234
242
|
// google.storage.control.v2.StorageControl.
|
|
235
|
-
this.storageControlStub = this._gaxGrpc.createStub(this._opts.fallback
|
|
236
|
-
this._protos.lookupService('google.storage.control.v2.StorageControl')
|
|
237
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
238
|
-
|
|
243
|
+
this.storageControlStub = this._gaxGrpc.createStub(this._opts.fallback
|
|
244
|
+
? this._protos.lookupService('google.storage.control.v2.StorageControl')
|
|
245
|
+
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
246
|
+
this._protos.google.storage.control.v2.StorageControl, this._opts, this._providedCustomServicePath);
|
|
239
247
|
// Iterate over each of the methods that the service provides
|
|
240
248
|
// and create an API call method for each.
|
|
241
|
-
const storageControlStubMethods = [
|
|
249
|
+
const storageControlStubMethods = [
|
|
250
|
+
'createFolder',
|
|
251
|
+
'deleteFolder',
|
|
252
|
+
'getFolder',
|
|
253
|
+
'listFolders',
|
|
254
|
+
'renameFolder',
|
|
255
|
+
'getStorageLayout',
|
|
256
|
+
'createManagedFolder',
|
|
257
|
+
'deleteManagedFolder',
|
|
258
|
+
'getManagedFolder',
|
|
259
|
+
'listManagedFolders',
|
|
260
|
+
'createAnywhereCache',
|
|
261
|
+
'updateAnywhereCache',
|
|
262
|
+
'disableAnywhereCache',
|
|
263
|
+
'pauseAnywhereCache',
|
|
264
|
+
'resumeAnywhereCache',
|
|
265
|
+
'getAnywhereCache',
|
|
266
|
+
'listAnywhereCaches',
|
|
267
|
+
'getProjectIntelligenceConfig',
|
|
268
|
+
'updateProjectIntelligenceConfig',
|
|
269
|
+
'getFolderIntelligenceConfig',
|
|
270
|
+
'updateFolderIntelligenceConfig',
|
|
271
|
+
'getOrganizationIntelligenceConfig',
|
|
272
|
+
'updateOrganizationIntelligenceConfig',
|
|
273
|
+
'getIamPolicy',
|
|
274
|
+
'setIamPolicy',
|
|
275
|
+
'testIamPermissions',
|
|
276
|
+
];
|
|
242
277
|
for (const methodName of storageControlStubMethods) {
|
|
243
278
|
const callPromise = this.storageControlStub.then(stub => (...args) => {
|
|
244
279
|
if (this._terminated) {
|
|
@@ -263,7 +298,8 @@ class StorageControlClient {
|
|
|
263
298
|
* @returns {string} The DNS address for this service.
|
|
264
299
|
*/
|
|
265
300
|
static get servicePath() {
|
|
266
|
-
if (typeof process === 'object' &&
|
|
301
|
+
if (typeof process === 'object' &&
|
|
302
|
+
typeof process.emitWarning === 'function') {
|
|
267
303
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
268
304
|
}
|
|
269
305
|
return 'storage.googleapis.com';
|
|
@@ -274,7 +310,8 @@ class StorageControlClient {
|
|
|
274
310
|
* @returns {string} The DNS address for this service.
|
|
275
311
|
*/
|
|
276
312
|
static get apiEndpoint() {
|
|
277
|
-
if (typeof process === 'object' &&
|
|
313
|
+
if (typeof process === 'object' &&
|
|
314
|
+
typeof process.emitWarning === 'function') {
|
|
278
315
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
279
316
|
}
|
|
280
317
|
return 'storage.googleapis.com';
|
|
@@ -307,7 +344,7 @@ class StorageControlClient {
|
|
|
307
344
|
'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
308
345
|
'https://www.googleapis.com/auth/devstorage.full_control',
|
|
309
346
|
'https://www.googleapis.com/auth/devstorage.read_only',
|
|
310
|
-
'https://www.googleapis.com/auth/devstorage.read_write'
|
|
347
|
+
'https://www.googleapis.com/auth/devstorage.read_write',
|
|
311
348
|
];
|
|
312
349
|
}
|
|
313
350
|
/**
|
|
@@ -337,7 +374,7 @@ class StorageControlClient {
|
|
|
337
374
|
options = options || {};
|
|
338
375
|
options.otherArgs = options.otherArgs || {};
|
|
339
376
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
340
|
-
|
|
377
|
+
const routingParameter = {};
|
|
341
378
|
{
|
|
342
379
|
const fieldValue = request.parent;
|
|
343
380
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -348,8 +385,11 @@ class StorageControlClient {
|
|
|
348
385
|
}
|
|
349
386
|
}
|
|
350
387
|
}
|
|
351
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
352
|
-
|
|
388
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
389
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
390
|
+
this.initialize().catch(err => {
|
|
391
|
+
throw err;
|
|
392
|
+
});
|
|
353
393
|
this._log.info('createFolder request %j', request);
|
|
354
394
|
const wrappedCallback = callback
|
|
355
395
|
? (error, response, options, rawResponse) => {
|
|
@@ -357,12 +397,16 @@ class StorageControlClient {
|
|
|
357
397
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
358
398
|
}
|
|
359
399
|
: undefined;
|
|
360
|
-
return this.innerApiCalls
|
|
400
|
+
return this.innerApiCalls
|
|
401
|
+
.createFolder(request, options, wrappedCallback)
|
|
361
402
|
?.then(([response, options, rawResponse]) => {
|
|
362
403
|
this._log.info('createFolder response %j', response);
|
|
363
404
|
return [response, options, rawResponse];
|
|
364
|
-
})
|
|
365
|
-
|
|
405
|
+
})
|
|
406
|
+
.catch((error) => {
|
|
407
|
+
if (error &&
|
|
408
|
+
'statusDetails' in error &&
|
|
409
|
+
error.statusDetails instanceof Array) {
|
|
366
410
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
367
411
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
368
412
|
}
|
|
@@ -385,19 +429,24 @@ class StorageControlClient {
|
|
|
385
429
|
options = options || {};
|
|
386
430
|
options.otherArgs = options.otherArgs || {};
|
|
387
431
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
388
|
-
|
|
432
|
+
const routingParameter = {};
|
|
389
433
|
{
|
|
390
434
|
const fieldValue = request.name;
|
|
391
435
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
392
|
-
const match = fieldValue
|
|
436
|
+
const match = fieldValue
|
|
437
|
+
.toString()
|
|
438
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
393
439
|
if (match) {
|
|
394
440
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
395
441
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
396
442
|
}
|
|
397
443
|
}
|
|
398
444
|
}
|
|
399
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
400
|
-
|
|
445
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
446
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
447
|
+
this.initialize().catch(err => {
|
|
448
|
+
throw err;
|
|
449
|
+
});
|
|
401
450
|
this._log.info('deleteFolder request %j', request);
|
|
402
451
|
const wrappedCallback = callback
|
|
403
452
|
? (error, response, options, rawResponse) => {
|
|
@@ -405,12 +454,16 @@ class StorageControlClient {
|
|
|
405
454
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
406
455
|
}
|
|
407
456
|
: undefined;
|
|
408
|
-
return this.innerApiCalls
|
|
457
|
+
return this.innerApiCalls
|
|
458
|
+
.deleteFolder(request, options, wrappedCallback)
|
|
409
459
|
?.then(([response, options, rawResponse]) => {
|
|
410
460
|
this._log.info('deleteFolder response %j', response);
|
|
411
461
|
return [response, options, rawResponse];
|
|
412
|
-
})
|
|
413
|
-
|
|
462
|
+
})
|
|
463
|
+
.catch((error) => {
|
|
464
|
+
if (error &&
|
|
465
|
+
'statusDetails' in error &&
|
|
466
|
+
error.statusDetails instanceof Array) {
|
|
414
467
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
415
468
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
416
469
|
}
|
|
@@ -433,19 +486,24 @@ class StorageControlClient {
|
|
|
433
486
|
options = options || {};
|
|
434
487
|
options.otherArgs = options.otherArgs || {};
|
|
435
488
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
436
|
-
|
|
489
|
+
const routingParameter = {};
|
|
437
490
|
{
|
|
438
491
|
const fieldValue = request.name;
|
|
439
492
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
440
|
-
const match = fieldValue
|
|
493
|
+
const match = fieldValue
|
|
494
|
+
.toString()
|
|
495
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
441
496
|
if (match) {
|
|
442
497
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
443
498
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
444
499
|
}
|
|
445
500
|
}
|
|
446
501
|
}
|
|
447
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
448
|
-
|
|
502
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
503
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
504
|
+
this.initialize().catch(err => {
|
|
505
|
+
throw err;
|
|
506
|
+
});
|
|
449
507
|
this._log.info('getFolder request %j', request);
|
|
450
508
|
const wrappedCallback = callback
|
|
451
509
|
? (error, response, options, rawResponse) => {
|
|
@@ -453,12 +511,16 @@ class StorageControlClient {
|
|
|
453
511
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
454
512
|
}
|
|
455
513
|
: undefined;
|
|
456
|
-
return this.innerApiCalls
|
|
514
|
+
return this.innerApiCalls
|
|
515
|
+
.getFolder(request, options, wrappedCallback)
|
|
457
516
|
?.then(([response, options, rawResponse]) => {
|
|
458
517
|
this._log.info('getFolder response %j', response);
|
|
459
518
|
return [response, options, rawResponse];
|
|
460
|
-
})
|
|
461
|
-
|
|
519
|
+
})
|
|
520
|
+
.catch((error) => {
|
|
521
|
+
if (error &&
|
|
522
|
+
'statusDetails' in error &&
|
|
523
|
+
error.statusDetails instanceof Array) {
|
|
462
524
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
463
525
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
464
526
|
}
|
|
@@ -481,19 +543,24 @@ class StorageControlClient {
|
|
|
481
543
|
options = options || {};
|
|
482
544
|
options.otherArgs = options.otherArgs || {};
|
|
483
545
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
484
|
-
|
|
546
|
+
const routingParameter = {};
|
|
485
547
|
{
|
|
486
548
|
const fieldValue = request.name;
|
|
487
549
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
488
|
-
const match = fieldValue
|
|
550
|
+
const match = fieldValue
|
|
551
|
+
.toString()
|
|
552
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
489
553
|
if (match) {
|
|
490
554
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
491
555
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
492
556
|
}
|
|
493
557
|
}
|
|
494
558
|
}
|
|
495
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
496
|
-
|
|
559
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
560
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
561
|
+
this.initialize().catch(err => {
|
|
562
|
+
throw err;
|
|
563
|
+
});
|
|
497
564
|
this._log.info('getStorageLayout request %j', request);
|
|
498
565
|
const wrappedCallback = callback
|
|
499
566
|
? (error, response, options, rawResponse) => {
|
|
@@ -501,12 +568,16 @@ class StorageControlClient {
|
|
|
501
568
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
502
569
|
}
|
|
503
570
|
: undefined;
|
|
504
|
-
return this.innerApiCalls
|
|
571
|
+
return this.innerApiCalls
|
|
572
|
+
.getStorageLayout(request, options, wrappedCallback)
|
|
505
573
|
?.then(([response, options, rawResponse]) => {
|
|
506
574
|
this._log.info('getStorageLayout response %j', response);
|
|
507
575
|
return [response, options, rawResponse];
|
|
508
|
-
})
|
|
509
|
-
|
|
576
|
+
})
|
|
577
|
+
.catch((error) => {
|
|
578
|
+
if (error &&
|
|
579
|
+
'statusDetails' in error &&
|
|
580
|
+
error.statusDetails instanceof Array) {
|
|
510
581
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
511
582
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
512
583
|
}
|
|
@@ -529,7 +600,7 @@ class StorageControlClient {
|
|
|
529
600
|
options = options || {};
|
|
530
601
|
options.otherArgs = options.otherArgs || {};
|
|
531
602
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
532
|
-
|
|
603
|
+
const routingParameter = {};
|
|
533
604
|
{
|
|
534
605
|
const fieldValue = request.parent;
|
|
535
606
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -540,8 +611,11 @@ class StorageControlClient {
|
|
|
540
611
|
}
|
|
541
612
|
}
|
|
542
613
|
}
|
|
543
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
544
|
-
|
|
614
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
615
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
616
|
+
this.initialize().catch(err => {
|
|
617
|
+
throw err;
|
|
618
|
+
});
|
|
545
619
|
this._log.info('createManagedFolder request %j', request);
|
|
546
620
|
const wrappedCallback = callback
|
|
547
621
|
? (error, response, options, rawResponse) => {
|
|
@@ -549,12 +623,16 @@ class StorageControlClient {
|
|
|
549
623
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
550
624
|
}
|
|
551
625
|
: undefined;
|
|
552
|
-
return this.innerApiCalls
|
|
626
|
+
return this.innerApiCalls
|
|
627
|
+
.createManagedFolder(request, options, wrappedCallback)
|
|
553
628
|
?.then(([response, options, rawResponse]) => {
|
|
554
629
|
this._log.info('createManagedFolder response %j', response);
|
|
555
630
|
return [response, options, rawResponse];
|
|
556
|
-
})
|
|
557
|
-
|
|
631
|
+
})
|
|
632
|
+
.catch((error) => {
|
|
633
|
+
if (error &&
|
|
634
|
+
'statusDetails' in error &&
|
|
635
|
+
error.statusDetails instanceof Array) {
|
|
558
636
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
559
637
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
560
638
|
}
|
|
@@ -577,19 +655,24 @@ class StorageControlClient {
|
|
|
577
655
|
options = options || {};
|
|
578
656
|
options.otherArgs = options.otherArgs || {};
|
|
579
657
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
580
|
-
|
|
658
|
+
const routingParameter = {};
|
|
581
659
|
{
|
|
582
660
|
const fieldValue = request.name;
|
|
583
661
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
584
|
-
const match = fieldValue
|
|
662
|
+
const match = fieldValue
|
|
663
|
+
.toString()
|
|
664
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
585
665
|
if (match) {
|
|
586
666
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
587
667
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
588
668
|
}
|
|
589
669
|
}
|
|
590
670
|
}
|
|
591
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
592
|
-
|
|
671
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
672
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
673
|
+
this.initialize().catch(err => {
|
|
674
|
+
throw err;
|
|
675
|
+
});
|
|
593
676
|
this._log.info('deleteManagedFolder request %j', request);
|
|
594
677
|
const wrappedCallback = callback
|
|
595
678
|
? (error, response, options, rawResponse) => {
|
|
@@ -597,12 +680,16 @@ class StorageControlClient {
|
|
|
597
680
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
598
681
|
}
|
|
599
682
|
: undefined;
|
|
600
|
-
return this.innerApiCalls
|
|
683
|
+
return this.innerApiCalls
|
|
684
|
+
.deleteManagedFolder(request, options, wrappedCallback)
|
|
601
685
|
?.then(([response, options, rawResponse]) => {
|
|
602
686
|
this._log.info('deleteManagedFolder response %j', response);
|
|
603
687
|
return [response, options, rawResponse];
|
|
604
|
-
})
|
|
605
|
-
|
|
688
|
+
})
|
|
689
|
+
.catch((error) => {
|
|
690
|
+
if (error &&
|
|
691
|
+
'statusDetails' in error &&
|
|
692
|
+
error.statusDetails instanceof Array) {
|
|
606
693
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
607
694
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
608
695
|
}
|
|
@@ -625,19 +712,24 @@ class StorageControlClient {
|
|
|
625
712
|
options = options || {};
|
|
626
713
|
options.otherArgs = options.otherArgs || {};
|
|
627
714
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
628
|
-
|
|
715
|
+
const routingParameter = {};
|
|
629
716
|
{
|
|
630
717
|
const fieldValue = request.name;
|
|
631
718
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
632
|
-
const match = fieldValue
|
|
719
|
+
const match = fieldValue
|
|
720
|
+
.toString()
|
|
721
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
633
722
|
if (match) {
|
|
634
723
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
635
724
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
636
725
|
}
|
|
637
726
|
}
|
|
638
727
|
}
|
|
639
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
640
|
-
|
|
728
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
729
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
730
|
+
this.initialize().catch(err => {
|
|
731
|
+
throw err;
|
|
732
|
+
});
|
|
641
733
|
this._log.info('getManagedFolder request %j', request);
|
|
642
734
|
const wrappedCallback = callback
|
|
643
735
|
? (error, response, options, rawResponse) => {
|
|
@@ -645,12 +737,16 @@ class StorageControlClient {
|
|
|
645
737
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
646
738
|
}
|
|
647
739
|
: undefined;
|
|
648
|
-
return this.innerApiCalls
|
|
740
|
+
return this.innerApiCalls
|
|
741
|
+
.getManagedFolder(request, options, wrappedCallback)
|
|
649
742
|
?.then(([response, options, rawResponse]) => {
|
|
650
743
|
this._log.info('getManagedFolder response %j', response);
|
|
651
744
|
return [response, options, rawResponse];
|
|
652
|
-
})
|
|
653
|
-
|
|
745
|
+
})
|
|
746
|
+
.catch((error) => {
|
|
747
|
+
if (error &&
|
|
748
|
+
'statusDetails' in error &&
|
|
749
|
+
error.statusDetails instanceof Array) {
|
|
654
750
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
655
751
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
656
752
|
}
|
|
@@ -673,19 +769,24 @@ class StorageControlClient {
|
|
|
673
769
|
options = options || {};
|
|
674
770
|
options.otherArgs = options.otherArgs || {};
|
|
675
771
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
676
|
-
|
|
772
|
+
const routingParameter = {};
|
|
677
773
|
{
|
|
678
774
|
const fieldValue = request.name;
|
|
679
775
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
680
|
-
const match = fieldValue
|
|
776
|
+
const match = fieldValue
|
|
777
|
+
.toString()
|
|
778
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
681
779
|
if (match) {
|
|
682
780
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
683
781
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
684
782
|
}
|
|
685
783
|
}
|
|
686
784
|
}
|
|
687
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
688
|
-
|
|
785
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
786
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
787
|
+
this.initialize().catch(err => {
|
|
788
|
+
throw err;
|
|
789
|
+
});
|
|
689
790
|
this._log.info('disableAnywhereCache request %j', request);
|
|
690
791
|
const wrappedCallback = callback
|
|
691
792
|
? (error, response, options, rawResponse) => {
|
|
@@ -693,12 +794,16 @@ class StorageControlClient {
|
|
|
693
794
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
694
795
|
}
|
|
695
796
|
: undefined;
|
|
696
|
-
return this.innerApiCalls
|
|
797
|
+
return this.innerApiCalls
|
|
798
|
+
.disableAnywhereCache(request, options, wrappedCallback)
|
|
697
799
|
?.then(([response, options, rawResponse]) => {
|
|
698
800
|
this._log.info('disableAnywhereCache response %j', response);
|
|
699
801
|
return [response, options, rawResponse];
|
|
700
|
-
})
|
|
701
|
-
|
|
802
|
+
})
|
|
803
|
+
.catch((error) => {
|
|
804
|
+
if (error &&
|
|
805
|
+
'statusDetails' in error &&
|
|
806
|
+
error.statusDetails instanceof Array) {
|
|
702
807
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
703
808
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
704
809
|
}
|
|
@@ -721,19 +826,24 @@ class StorageControlClient {
|
|
|
721
826
|
options = options || {};
|
|
722
827
|
options.otherArgs = options.otherArgs || {};
|
|
723
828
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
724
|
-
|
|
829
|
+
const routingParameter = {};
|
|
725
830
|
{
|
|
726
831
|
const fieldValue = request.name;
|
|
727
832
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
728
|
-
const match = fieldValue
|
|
833
|
+
const match = fieldValue
|
|
834
|
+
.toString()
|
|
835
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
729
836
|
if (match) {
|
|
730
837
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
731
838
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
732
839
|
}
|
|
733
840
|
}
|
|
734
841
|
}
|
|
735
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
736
|
-
|
|
842
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
843
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
844
|
+
this.initialize().catch(err => {
|
|
845
|
+
throw err;
|
|
846
|
+
});
|
|
737
847
|
this._log.info('pauseAnywhereCache request %j', request);
|
|
738
848
|
const wrappedCallback = callback
|
|
739
849
|
? (error, response, options, rawResponse) => {
|
|
@@ -741,12 +851,16 @@ class StorageControlClient {
|
|
|
741
851
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
742
852
|
}
|
|
743
853
|
: undefined;
|
|
744
|
-
return this.innerApiCalls
|
|
854
|
+
return this.innerApiCalls
|
|
855
|
+
.pauseAnywhereCache(request, options, wrappedCallback)
|
|
745
856
|
?.then(([response, options, rawResponse]) => {
|
|
746
857
|
this._log.info('pauseAnywhereCache response %j', response);
|
|
747
858
|
return [response, options, rawResponse];
|
|
748
|
-
})
|
|
749
|
-
|
|
859
|
+
})
|
|
860
|
+
.catch((error) => {
|
|
861
|
+
if (error &&
|
|
862
|
+
'statusDetails' in error &&
|
|
863
|
+
error.statusDetails instanceof Array) {
|
|
750
864
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
751
865
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
752
866
|
}
|
|
@@ -769,19 +883,24 @@ class StorageControlClient {
|
|
|
769
883
|
options = options || {};
|
|
770
884
|
options.otherArgs = options.otherArgs || {};
|
|
771
885
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
772
|
-
|
|
886
|
+
const routingParameter = {};
|
|
773
887
|
{
|
|
774
888
|
const fieldValue = request.name;
|
|
775
889
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
776
|
-
const match = fieldValue
|
|
890
|
+
const match = fieldValue
|
|
891
|
+
.toString()
|
|
892
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
777
893
|
if (match) {
|
|
778
894
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
779
895
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
780
896
|
}
|
|
781
897
|
}
|
|
782
898
|
}
|
|
783
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
784
|
-
|
|
899
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
900
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
901
|
+
this.initialize().catch(err => {
|
|
902
|
+
throw err;
|
|
903
|
+
});
|
|
785
904
|
this._log.info('resumeAnywhereCache request %j', request);
|
|
786
905
|
const wrappedCallback = callback
|
|
787
906
|
? (error, response, options, rawResponse) => {
|
|
@@ -789,12 +908,16 @@ class StorageControlClient {
|
|
|
789
908
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
790
909
|
}
|
|
791
910
|
: undefined;
|
|
792
|
-
return this.innerApiCalls
|
|
911
|
+
return this.innerApiCalls
|
|
912
|
+
.resumeAnywhereCache(request, options, wrappedCallback)
|
|
793
913
|
?.then(([response, options, rawResponse]) => {
|
|
794
914
|
this._log.info('resumeAnywhereCache response %j', response);
|
|
795
915
|
return [response, options, rawResponse];
|
|
796
|
-
})
|
|
797
|
-
|
|
916
|
+
})
|
|
917
|
+
.catch((error) => {
|
|
918
|
+
if (error &&
|
|
919
|
+
'statusDetails' in error &&
|
|
920
|
+
error.statusDetails instanceof Array) {
|
|
798
921
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
799
922
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
800
923
|
}
|
|
@@ -817,19 +940,24 @@ class StorageControlClient {
|
|
|
817
940
|
options = options || {};
|
|
818
941
|
options.otherArgs = options.otherArgs || {};
|
|
819
942
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
820
|
-
|
|
943
|
+
const routingParameter = {};
|
|
821
944
|
{
|
|
822
945
|
const fieldValue = request.name;
|
|
823
946
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
824
|
-
const match = fieldValue
|
|
947
|
+
const match = fieldValue
|
|
948
|
+
.toString()
|
|
949
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
825
950
|
if (match) {
|
|
826
951
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
827
952
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
828
953
|
}
|
|
829
954
|
}
|
|
830
955
|
}
|
|
831
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
832
|
-
|
|
956
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
957
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
958
|
+
this.initialize().catch(err => {
|
|
959
|
+
throw err;
|
|
960
|
+
});
|
|
833
961
|
this._log.info('getAnywhereCache request %j', request);
|
|
834
962
|
const wrappedCallback = callback
|
|
835
963
|
? (error, response, options, rawResponse) => {
|
|
@@ -837,12 +965,16 @@ class StorageControlClient {
|
|
|
837
965
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
838
966
|
}
|
|
839
967
|
: undefined;
|
|
840
|
-
return this.innerApiCalls
|
|
968
|
+
return this.innerApiCalls
|
|
969
|
+
.getAnywhereCache(request, options, wrappedCallback)
|
|
841
970
|
?.then(([response, options, rawResponse]) => {
|
|
842
971
|
this._log.info('getAnywhereCache response %j', response);
|
|
843
972
|
return [response, options, rawResponse];
|
|
844
|
-
})
|
|
845
|
-
|
|
973
|
+
})
|
|
974
|
+
.catch((error) => {
|
|
975
|
+
if (error &&
|
|
976
|
+
'statusDetails' in error &&
|
|
977
|
+
error.statusDetails instanceof Array) {
|
|
846
978
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
847
979
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
848
980
|
}
|
|
@@ -862,10 +994,13 @@ class StorageControlClient {
|
|
|
862
994
|
options = options || {};
|
|
863
995
|
options.otherArgs = options.otherArgs || {};
|
|
864
996
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
865
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
866
|
-
|
|
997
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
998
|
+
this._gaxModule.routingHeader.fromParams({
|
|
999
|
+
name: request.name ?? '',
|
|
1000
|
+
});
|
|
1001
|
+
this.initialize().catch(err => {
|
|
1002
|
+
throw err;
|
|
867
1003
|
});
|
|
868
|
-
this.initialize().catch(err => { throw err; });
|
|
869
1004
|
this._log.info('getProjectIntelligenceConfig request %j', request);
|
|
870
1005
|
const wrappedCallback = callback
|
|
871
1006
|
? (error, response, options, rawResponse) => {
|
|
@@ -873,12 +1008,16 @@ class StorageControlClient {
|
|
|
873
1008
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
874
1009
|
}
|
|
875
1010
|
: undefined;
|
|
876
|
-
return this.innerApiCalls
|
|
1011
|
+
return this.innerApiCalls
|
|
1012
|
+
.getProjectIntelligenceConfig(request, options, wrappedCallback)
|
|
877
1013
|
?.then(([response, options, rawResponse]) => {
|
|
878
1014
|
this._log.info('getProjectIntelligenceConfig response %j', response);
|
|
879
1015
|
return [response, options, rawResponse];
|
|
880
|
-
})
|
|
881
|
-
|
|
1016
|
+
})
|
|
1017
|
+
.catch((error) => {
|
|
1018
|
+
if (error &&
|
|
1019
|
+
'statusDetails' in error &&
|
|
1020
|
+
error.statusDetails instanceof Array) {
|
|
882
1021
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
883
1022
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
884
1023
|
}
|
|
@@ -898,10 +1037,13 @@ class StorageControlClient {
|
|
|
898
1037
|
options = options || {};
|
|
899
1038
|
options.otherArgs = options.otherArgs || {};
|
|
900
1039
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
901
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
902
|
-
|
|
1040
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1041
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1042
|
+
'intelligence_config.name': request.intelligenceConfig.name ?? '',
|
|
1043
|
+
});
|
|
1044
|
+
this.initialize().catch(err => {
|
|
1045
|
+
throw err;
|
|
903
1046
|
});
|
|
904
|
-
this.initialize().catch(err => { throw err; });
|
|
905
1047
|
this._log.info('updateProjectIntelligenceConfig request %j', request);
|
|
906
1048
|
const wrappedCallback = callback
|
|
907
1049
|
? (error, response, options, rawResponse) => {
|
|
@@ -909,12 +1051,16 @@ class StorageControlClient {
|
|
|
909
1051
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
910
1052
|
}
|
|
911
1053
|
: undefined;
|
|
912
|
-
return this.innerApiCalls
|
|
1054
|
+
return this.innerApiCalls
|
|
1055
|
+
.updateProjectIntelligenceConfig(request, options, wrappedCallback)
|
|
913
1056
|
?.then(([response, options, rawResponse]) => {
|
|
914
1057
|
this._log.info('updateProjectIntelligenceConfig response %j', response);
|
|
915
1058
|
return [response, options, rawResponse];
|
|
916
|
-
})
|
|
917
|
-
|
|
1059
|
+
})
|
|
1060
|
+
.catch((error) => {
|
|
1061
|
+
if (error &&
|
|
1062
|
+
'statusDetails' in error &&
|
|
1063
|
+
error.statusDetails instanceof Array) {
|
|
918
1064
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
919
1065
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
920
1066
|
}
|
|
@@ -934,10 +1080,13 @@ class StorageControlClient {
|
|
|
934
1080
|
options = options || {};
|
|
935
1081
|
options.otherArgs = options.otherArgs || {};
|
|
936
1082
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
937
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
938
|
-
|
|
1083
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1084
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1085
|
+
name: request.name ?? '',
|
|
1086
|
+
});
|
|
1087
|
+
this.initialize().catch(err => {
|
|
1088
|
+
throw err;
|
|
939
1089
|
});
|
|
940
|
-
this.initialize().catch(err => { throw err; });
|
|
941
1090
|
this._log.info('getFolderIntelligenceConfig request %j', request);
|
|
942
1091
|
const wrappedCallback = callback
|
|
943
1092
|
? (error, response, options, rawResponse) => {
|
|
@@ -945,12 +1094,16 @@ class StorageControlClient {
|
|
|
945
1094
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
946
1095
|
}
|
|
947
1096
|
: undefined;
|
|
948
|
-
return this.innerApiCalls
|
|
1097
|
+
return this.innerApiCalls
|
|
1098
|
+
.getFolderIntelligenceConfig(request, options, wrappedCallback)
|
|
949
1099
|
?.then(([response, options, rawResponse]) => {
|
|
950
1100
|
this._log.info('getFolderIntelligenceConfig response %j', response);
|
|
951
1101
|
return [response, options, rawResponse];
|
|
952
|
-
})
|
|
953
|
-
|
|
1102
|
+
})
|
|
1103
|
+
.catch((error) => {
|
|
1104
|
+
if (error &&
|
|
1105
|
+
'statusDetails' in error &&
|
|
1106
|
+
error.statusDetails instanceof Array) {
|
|
954
1107
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
955
1108
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
956
1109
|
}
|
|
@@ -970,10 +1123,13 @@ class StorageControlClient {
|
|
|
970
1123
|
options = options || {};
|
|
971
1124
|
options.otherArgs = options.otherArgs || {};
|
|
972
1125
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
973
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
974
|
-
|
|
1126
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1127
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1128
|
+
'intelligence_config.name': request.intelligenceConfig.name ?? '',
|
|
1129
|
+
});
|
|
1130
|
+
this.initialize().catch(err => {
|
|
1131
|
+
throw err;
|
|
975
1132
|
});
|
|
976
|
-
this.initialize().catch(err => { throw err; });
|
|
977
1133
|
this._log.info('updateFolderIntelligenceConfig request %j', request);
|
|
978
1134
|
const wrappedCallback = callback
|
|
979
1135
|
? (error, response, options, rawResponse) => {
|
|
@@ -981,12 +1137,16 @@ class StorageControlClient {
|
|
|
981
1137
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
982
1138
|
}
|
|
983
1139
|
: undefined;
|
|
984
|
-
return this.innerApiCalls
|
|
1140
|
+
return this.innerApiCalls
|
|
1141
|
+
.updateFolderIntelligenceConfig(request, options, wrappedCallback)
|
|
985
1142
|
?.then(([response, options, rawResponse]) => {
|
|
986
1143
|
this._log.info('updateFolderIntelligenceConfig response %j', response);
|
|
987
1144
|
return [response, options, rawResponse];
|
|
988
|
-
})
|
|
989
|
-
|
|
1145
|
+
})
|
|
1146
|
+
.catch((error) => {
|
|
1147
|
+
if (error &&
|
|
1148
|
+
'statusDetails' in error &&
|
|
1149
|
+
error.statusDetails instanceof Array) {
|
|
990
1150
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
991
1151
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
992
1152
|
}
|
|
@@ -1006,10 +1166,13 @@ class StorageControlClient {
|
|
|
1006
1166
|
options = options || {};
|
|
1007
1167
|
options.otherArgs = options.otherArgs || {};
|
|
1008
1168
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1009
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1010
|
-
|
|
1169
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1170
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1171
|
+
name: request.name ?? '',
|
|
1172
|
+
});
|
|
1173
|
+
this.initialize().catch(err => {
|
|
1174
|
+
throw err;
|
|
1011
1175
|
});
|
|
1012
|
-
this.initialize().catch(err => { throw err; });
|
|
1013
1176
|
this._log.info('getOrganizationIntelligenceConfig request %j', request);
|
|
1014
1177
|
const wrappedCallback = callback
|
|
1015
1178
|
? (error, response, options, rawResponse) => {
|
|
@@ -1017,12 +1180,16 @@ class StorageControlClient {
|
|
|
1017
1180
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1018
1181
|
}
|
|
1019
1182
|
: undefined;
|
|
1020
|
-
return this.innerApiCalls
|
|
1183
|
+
return this.innerApiCalls
|
|
1184
|
+
.getOrganizationIntelligenceConfig(request, options, wrappedCallback)
|
|
1021
1185
|
?.then(([response, options, rawResponse]) => {
|
|
1022
1186
|
this._log.info('getOrganizationIntelligenceConfig response %j', response);
|
|
1023
1187
|
return [response, options, rawResponse];
|
|
1024
|
-
})
|
|
1025
|
-
|
|
1188
|
+
})
|
|
1189
|
+
.catch((error) => {
|
|
1190
|
+
if (error &&
|
|
1191
|
+
'statusDetails' in error &&
|
|
1192
|
+
error.statusDetails instanceof Array) {
|
|
1026
1193
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1027
1194
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1028
1195
|
}
|
|
@@ -1042,10 +1209,13 @@ class StorageControlClient {
|
|
|
1042
1209
|
options = options || {};
|
|
1043
1210
|
options.otherArgs = options.otherArgs || {};
|
|
1044
1211
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1045
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1046
|
-
|
|
1212
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1213
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1214
|
+
'intelligence_config.name': request.intelligenceConfig.name ?? '',
|
|
1215
|
+
});
|
|
1216
|
+
this.initialize().catch(err => {
|
|
1217
|
+
throw err;
|
|
1047
1218
|
});
|
|
1048
|
-
this.initialize().catch(err => { throw err; });
|
|
1049
1219
|
this._log.info('updateOrganizationIntelligenceConfig request %j', request);
|
|
1050
1220
|
const wrappedCallback = callback
|
|
1051
1221
|
? (error, response, options, rawResponse) => {
|
|
@@ -1053,12 +1223,16 @@ class StorageControlClient {
|
|
|
1053
1223
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1054
1224
|
}
|
|
1055
1225
|
: undefined;
|
|
1056
|
-
return this.innerApiCalls
|
|
1226
|
+
return this.innerApiCalls
|
|
1227
|
+
.updateOrganizationIntelligenceConfig(request, options, wrappedCallback)
|
|
1057
1228
|
?.then(([response, options, rawResponse]) => {
|
|
1058
1229
|
this._log.info('updateOrganizationIntelligenceConfig response %j', response);
|
|
1059
1230
|
return [response, options, rawResponse];
|
|
1060
|
-
})
|
|
1061
|
-
|
|
1231
|
+
})
|
|
1232
|
+
.catch((error) => {
|
|
1233
|
+
if (error &&
|
|
1234
|
+
'statusDetails' in error &&
|
|
1235
|
+
error.statusDetails instanceof Array) {
|
|
1062
1236
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1063
1237
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1064
1238
|
}
|
|
@@ -1078,7 +1252,7 @@ class StorageControlClient {
|
|
|
1078
1252
|
options = options || {};
|
|
1079
1253
|
options.otherArgs = options.otherArgs || {};
|
|
1080
1254
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1081
|
-
|
|
1255
|
+
const routingParameter = {};
|
|
1082
1256
|
{
|
|
1083
1257
|
const fieldValue = request.resource;
|
|
1084
1258
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1092,15 +1266,20 @@ class StorageControlClient {
|
|
|
1092
1266
|
{
|
|
1093
1267
|
const fieldValue = request.resource;
|
|
1094
1268
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
1095
|
-
const match = fieldValue
|
|
1269
|
+
const match = fieldValue
|
|
1270
|
+
.toString()
|
|
1271
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
1096
1272
|
if (match) {
|
|
1097
1273
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
1098
1274
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
1099
1275
|
}
|
|
1100
1276
|
}
|
|
1101
1277
|
}
|
|
1102
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1103
|
-
|
|
1278
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1279
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1280
|
+
this.initialize().catch(err => {
|
|
1281
|
+
throw err;
|
|
1282
|
+
});
|
|
1104
1283
|
this._log.info('getIamPolicy request %j', request);
|
|
1105
1284
|
const wrappedCallback = callback
|
|
1106
1285
|
? (error, response, options, rawResponse) => {
|
|
@@ -1108,12 +1287,16 @@ class StorageControlClient {
|
|
|
1108
1287
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1109
1288
|
}
|
|
1110
1289
|
: undefined;
|
|
1111
|
-
return this.innerApiCalls
|
|
1290
|
+
return this.innerApiCalls
|
|
1291
|
+
.getIamPolicy(request, options, wrappedCallback)
|
|
1112
1292
|
?.then(([response, options, rawResponse]) => {
|
|
1113
1293
|
this._log.info('getIamPolicy response %j', response);
|
|
1114
1294
|
return [response, options, rawResponse];
|
|
1115
|
-
})
|
|
1116
|
-
|
|
1295
|
+
})
|
|
1296
|
+
.catch((error) => {
|
|
1297
|
+
if (error &&
|
|
1298
|
+
'statusDetails' in error &&
|
|
1299
|
+
error.statusDetails instanceof Array) {
|
|
1117
1300
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1118
1301
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1119
1302
|
}
|
|
@@ -1133,7 +1316,7 @@ class StorageControlClient {
|
|
|
1133
1316
|
options = options || {};
|
|
1134
1317
|
options.otherArgs = options.otherArgs || {};
|
|
1135
1318
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1136
|
-
|
|
1319
|
+
const routingParameter = {};
|
|
1137
1320
|
{
|
|
1138
1321
|
const fieldValue = request.resource;
|
|
1139
1322
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1147,15 +1330,20 @@ class StorageControlClient {
|
|
|
1147
1330
|
{
|
|
1148
1331
|
const fieldValue = request.resource;
|
|
1149
1332
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
1150
|
-
const match = fieldValue
|
|
1333
|
+
const match = fieldValue
|
|
1334
|
+
.toString()
|
|
1335
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
1151
1336
|
if (match) {
|
|
1152
1337
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
1153
1338
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
1154
1339
|
}
|
|
1155
1340
|
}
|
|
1156
1341
|
}
|
|
1157
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1158
|
-
|
|
1342
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1343
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1344
|
+
this.initialize().catch(err => {
|
|
1345
|
+
throw err;
|
|
1346
|
+
});
|
|
1159
1347
|
this._log.info('setIamPolicy request %j', request);
|
|
1160
1348
|
const wrappedCallback = callback
|
|
1161
1349
|
? (error, response, options, rawResponse) => {
|
|
@@ -1163,12 +1351,16 @@ class StorageControlClient {
|
|
|
1163
1351
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1164
1352
|
}
|
|
1165
1353
|
: undefined;
|
|
1166
|
-
return this.innerApiCalls
|
|
1354
|
+
return this.innerApiCalls
|
|
1355
|
+
.setIamPolicy(request, options, wrappedCallback)
|
|
1167
1356
|
?.then(([response, options, rawResponse]) => {
|
|
1168
1357
|
this._log.info('setIamPolicy response %j', response);
|
|
1169
1358
|
return [response, options, rawResponse];
|
|
1170
|
-
})
|
|
1171
|
-
|
|
1359
|
+
})
|
|
1360
|
+
.catch((error) => {
|
|
1361
|
+
if (error &&
|
|
1362
|
+
'statusDetails' in error &&
|
|
1363
|
+
error.statusDetails instanceof Array) {
|
|
1172
1364
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1173
1365
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1174
1366
|
}
|
|
@@ -1188,7 +1380,7 @@ class StorageControlClient {
|
|
|
1188
1380
|
options = options || {};
|
|
1189
1381
|
options.otherArgs = options.otherArgs || {};
|
|
1190
1382
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1191
|
-
|
|
1383
|
+
const routingParameter = {};
|
|
1192
1384
|
{
|
|
1193
1385
|
const fieldValue = request.resource;
|
|
1194
1386
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1202,7 +1394,9 @@ class StorageControlClient {
|
|
|
1202
1394
|
{
|
|
1203
1395
|
const fieldValue = request.resource;
|
|
1204
1396
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
1205
|
-
const match = fieldValue
|
|
1397
|
+
const match = fieldValue
|
|
1398
|
+
.toString()
|
|
1399
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)/objects(?:/.*)?'));
|
|
1206
1400
|
if (match) {
|
|
1207
1401
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
1208
1402
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
@@ -1212,15 +1406,20 @@ class StorageControlClient {
|
|
|
1212
1406
|
{
|
|
1213
1407
|
const fieldValue = request.resource;
|
|
1214
1408
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
1215
|
-
const match = fieldValue
|
|
1409
|
+
const match = fieldValue
|
|
1410
|
+
.toString()
|
|
1411
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)/managedFolders(?:/.*)?'));
|
|
1216
1412
|
if (match) {
|
|
1217
1413
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
1218
1414
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
1219
1415
|
}
|
|
1220
1416
|
}
|
|
1221
1417
|
}
|
|
1222
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1223
|
-
|
|
1418
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1419
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1420
|
+
this.initialize().catch(err => {
|
|
1421
|
+
throw err;
|
|
1422
|
+
});
|
|
1224
1423
|
this._log.info('testIamPermissions request %j', request);
|
|
1225
1424
|
const wrappedCallback = callback
|
|
1226
1425
|
? (error, response, options, rawResponse) => {
|
|
@@ -1228,12 +1427,16 @@ class StorageControlClient {
|
|
|
1228
1427
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1229
1428
|
}
|
|
1230
1429
|
: undefined;
|
|
1231
|
-
return this.innerApiCalls
|
|
1430
|
+
return this.innerApiCalls
|
|
1431
|
+
.testIamPermissions(request, options, wrappedCallback)
|
|
1232
1432
|
?.then(([response, options, rawResponse]) => {
|
|
1233
1433
|
this._log.info('testIamPermissions response %j', response);
|
|
1234
1434
|
return [response, options, rawResponse];
|
|
1235
|
-
})
|
|
1236
|
-
|
|
1435
|
+
})
|
|
1436
|
+
.catch((error) => {
|
|
1437
|
+
if (error &&
|
|
1438
|
+
'statusDetails' in error &&
|
|
1439
|
+
error.statusDetails instanceof Array) {
|
|
1237
1440
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1238
1441
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1239
1442
|
}
|
|
@@ -1256,19 +1459,24 @@ class StorageControlClient {
|
|
|
1256
1459
|
options = options || {};
|
|
1257
1460
|
options.otherArgs = options.otherArgs || {};
|
|
1258
1461
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1259
|
-
|
|
1462
|
+
const routingParameter = {};
|
|
1260
1463
|
{
|
|
1261
1464
|
const fieldValue = request.name;
|
|
1262
1465
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
1263
|
-
const match = fieldValue
|
|
1466
|
+
const match = fieldValue
|
|
1467
|
+
.toString()
|
|
1468
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
1264
1469
|
if (match) {
|
|
1265
1470
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
1266
1471
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
1267
1472
|
}
|
|
1268
1473
|
}
|
|
1269
1474
|
}
|
|
1270
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1271
|
-
|
|
1475
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1476
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1477
|
+
this.initialize().catch(err => {
|
|
1478
|
+
throw err;
|
|
1479
|
+
});
|
|
1272
1480
|
const wrappedCallback = callback
|
|
1273
1481
|
? (error, response, rawResponse, _) => {
|
|
1274
1482
|
this._log.info('renameFolder response %j', rawResponse);
|
|
@@ -1276,7 +1484,8 @@ class StorageControlClient {
|
|
|
1276
1484
|
}
|
|
1277
1485
|
: undefined;
|
|
1278
1486
|
this._log.info('renameFolder request %j', request);
|
|
1279
|
-
return this.innerApiCalls
|
|
1487
|
+
return this.innerApiCalls
|
|
1488
|
+
.renameFolder(request, options, wrappedCallback)
|
|
1280
1489
|
?.then(([response, rawResponse, _]) => {
|
|
1281
1490
|
this._log.info('renameFolder response %j', rawResponse);
|
|
1282
1491
|
return [response, rawResponse, _];
|
|
@@ -1316,7 +1525,7 @@ class StorageControlClient {
|
|
|
1316
1525
|
options = options || {};
|
|
1317
1526
|
options.otherArgs = options.otherArgs || {};
|
|
1318
1527
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1319
|
-
|
|
1528
|
+
const routingParameter = {};
|
|
1320
1529
|
{
|
|
1321
1530
|
const fieldValue = request.parent;
|
|
1322
1531
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1327,8 +1536,11 @@ class StorageControlClient {
|
|
|
1327
1536
|
}
|
|
1328
1537
|
}
|
|
1329
1538
|
}
|
|
1330
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1331
|
-
|
|
1539
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1540
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1541
|
+
this.initialize().catch(err => {
|
|
1542
|
+
throw err;
|
|
1543
|
+
});
|
|
1332
1544
|
const wrappedCallback = callback
|
|
1333
1545
|
? (error, response, rawResponse, _) => {
|
|
1334
1546
|
this._log.info('createAnywhereCache response %j', rawResponse);
|
|
@@ -1336,7 +1548,8 @@ class StorageControlClient {
|
|
|
1336
1548
|
}
|
|
1337
1549
|
: undefined;
|
|
1338
1550
|
this._log.info('createAnywhereCache request %j', request);
|
|
1339
|
-
return this.innerApiCalls
|
|
1551
|
+
return this.innerApiCalls
|
|
1552
|
+
.createAnywhereCache(request, options, wrappedCallback)
|
|
1340
1553
|
?.then(([response, rawResponse, _]) => {
|
|
1341
1554
|
this._log.info('createAnywhereCache response %j', rawResponse);
|
|
1342
1555
|
return [response, rawResponse, _];
|
|
@@ -1376,19 +1589,24 @@ class StorageControlClient {
|
|
|
1376
1589
|
options = options || {};
|
|
1377
1590
|
options.otherArgs = options.otherArgs || {};
|
|
1378
1591
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1379
|
-
|
|
1592
|
+
const routingParameter = {};
|
|
1380
1593
|
{
|
|
1381
1594
|
const fieldValue = request.anywhereCache?.name;
|
|
1382
1595
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
1383
|
-
const match = fieldValue
|
|
1596
|
+
const match = fieldValue
|
|
1597
|
+
.toString()
|
|
1598
|
+
.match(RegExp('(?<bucket>projects/[^/]+/buckets/[^/]+)(?:/.*)?'));
|
|
1384
1599
|
if (match) {
|
|
1385
1600
|
const parameterValue = match.groups?.['bucket'] ?? fieldValue;
|
|
1386
1601
|
Object.assign(routingParameter, { bucket: parameterValue });
|
|
1387
1602
|
}
|
|
1388
1603
|
}
|
|
1389
1604
|
}
|
|
1390
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1391
|
-
|
|
1605
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1606
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1607
|
+
this.initialize().catch(err => {
|
|
1608
|
+
throw err;
|
|
1609
|
+
});
|
|
1392
1610
|
const wrappedCallback = callback
|
|
1393
1611
|
? (error, response, rawResponse, _) => {
|
|
1394
1612
|
this._log.info('updateAnywhereCache response %j', rawResponse);
|
|
@@ -1396,7 +1614,8 @@ class StorageControlClient {
|
|
|
1396
1614
|
}
|
|
1397
1615
|
: undefined;
|
|
1398
1616
|
this._log.info('updateAnywhereCache request %j', request);
|
|
1399
|
-
return this.innerApiCalls
|
|
1617
|
+
return this.innerApiCalls
|
|
1618
|
+
.updateAnywhereCache(request, options, wrappedCallback)
|
|
1400
1619
|
?.then(([response, rawResponse, _]) => {
|
|
1401
1620
|
this._log.info('updateAnywhereCache response %j', rawResponse);
|
|
1402
1621
|
return [response, rawResponse, _];
|
|
@@ -1433,7 +1652,7 @@ class StorageControlClient {
|
|
|
1433
1652
|
options = options || {};
|
|
1434
1653
|
options.otherArgs = options.otherArgs || {};
|
|
1435
1654
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1436
|
-
|
|
1655
|
+
const routingParameter = {};
|
|
1437
1656
|
{
|
|
1438
1657
|
const fieldValue = request.parent;
|
|
1439
1658
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1444,8 +1663,11 @@ class StorageControlClient {
|
|
|
1444
1663
|
}
|
|
1445
1664
|
}
|
|
1446
1665
|
}
|
|
1447
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1448
|
-
|
|
1666
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1667
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1668
|
+
this.initialize().catch(err => {
|
|
1669
|
+
throw err;
|
|
1670
|
+
});
|
|
1449
1671
|
const wrappedCallback = callback
|
|
1450
1672
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
1451
1673
|
this._log.info('listFolders values %j', values);
|
|
@@ -1509,7 +1731,7 @@ class StorageControlClient {
|
|
|
1509
1731
|
options = options || {};
|
|
1510
1732
|
options.otherArgs = options.otherArgs || {};
|
|
1511
1733
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1512
|
-
|
|
1734
|
+
const routingParameter = {};
|
|
1513
1735
|
{
|
|
1514
1736
|
const fieldValue = request.parent;
|
|
1515
1737
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1520,10 +1742,13 @@ class StorageControlClient {
|
|
|
1520
1742
|
}
|
|
1521
1743
|
}
|
|
1522
1744
|
}
|
|
1523
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1745
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1746
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1524
1747
|
const defaultCallSettings = this._defaults['listFolders'];
|
|
1525
1748
|
const callSettings = defaultCallSettings.merge(options);
|
|
1526
|
-
this.initialize().catch(err => {
|
|
1749
|
+
this.initialize().catch(err => {
|
|
1750
|
+
throw err;
|
|
1751
|
+
});
|
|
1527
1752
|
this._log.info('listFolders stream %j', request);
|
|
1528
1753
|
return this.descriptors.page.listFolders.createStream(this.innerApiCalls.listFolders, request, callSettings);
|
|
1529
1754
|
}
|
|
@@ -1579,7 +1804,7 @@ class StorageControlClient {
|
|
|
1579
1804
|
options = options || {};
|
|
1580
1805
|
options.otherArgs = options.otherArgs || {};
|
|
1581
1806
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1582
|
-
|
|
1807
|
+
const routingParameter = {};
|
|
1583
1808
|
{
|
|
1584
1809
|
const fieldValue = request.parent;
|
|
1585
1810
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1590,10 +1815,13 @@ class StorageControlClient {
|
|
|
1590
1815
|
}
|
|
1591
1816
|
}
|
|
1592
1817
|
}
|
|
1593
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1818
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1819
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1594
1820
|
const defaultCallSettings = this._defaults['listFolders'];
|
|
1595
1821
|
const callSettings = defaultCallSettings.merge(options);
|
|
1596
|
-
this.initialize().catch(err => {
|
|
1822
|
+
this.initialize().catch(err => {
|
|
1823
|
+
throw err;
|
|
1824
|
+
});
|
|
1597
1825
|
this._log.info('listFolders iterate %j', request);
|
|
1598
1826
|
return this.descriptors.page.listFolders.asyncIterate(this.innerApiCalls['listFolders'], request, callSettings);
|
|
1599
1827
|
}
|
|
@@ -1613,7 +1841,7 @@ class StorageControlClient {
|
|
|
1613
1841
|
options = options || {};
|
|
1614
1842
|
options.otherArgs = options.otherArgs || {};
|
|
1615
1843
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1616
|
-
|
|
1844
|
+
const routingParameter = {};
|
|
1617
1845
|
{
|
|
1618
1846
|
const fieldValue = request.parent;
|
|
1619
1847
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1624,8 +1852,11 @@ class StorageControlClient {
|
|
|
1624
1852
|
}
|
|
1625
1853
|
}
|
|
1626
1854
|
}
|
|
1627
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1628
|
-
|
|
1855
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1856
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1857
|
+
this.initialize().catch(err => {
|
|
1858
|
+
throw err;
|
|
1859
|
+
});
|
|
1629
1860
|
const wrappedCallback = callback
|
|
1630
1861
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
1631
1862
|
this._log.info('listManagedFolders values %j', values);
|
|
@@ -1677,7 +1908,7 @@ class StorageControlClient {
|
|
|
1677
1908
|
options = options || {};
|
|
1678
1909
|
options.otherArgs = options.otherArgs || {};
|
|
1679
1910
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1680
|
-
|
|
1911
|
+
const routingParameter = {};
|
|
1681
1912
|
{
|
|
1682
1913
|
const fieldValue = request.parent;
|
|
1683
1914
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1688,10 +1919,13 @@ class StorageControlClient {
|
|
|
1688
1919
|
}
|
|
1689
1920
|
}
|
|
1690
1921
|
}
|
|
1691
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1922
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1923
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1692
1924
|
const defaultCallSettings = this._defaults['listManagedFolders'];
|
|
1693
1925
|
const callSettings = defaultCallSettings.merge(options);
|
|
1694
|
-
this.initialize().catch(err => {
|
|
1926
|
+
this.initialize().catch(err => {
|
|
1927
|
+
throw err;
|
|
1928
|
+
});
|
|
1695
1929
|
this._log.info('listManagedFolders stream %j', request);
|
|
1696
1930
|
return this.descriptors.page.listManagedFolders.createStream(this.innerApiCalls.listManagedFolders, request, callSettings);
|
|
1697
1931
|
}
|
|
@@ -1735,7 +1969,7 @@ class StorageControlClient {
|
|
|
1735
1969
|
options = options || {};
|
|
1736
1970
|
options.otherArgs = options.otherArgs || {};
|
|
1737
1971
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1738
|
-
|
|
1972
|
+
const routingParameter = {};
|
|
1739
1973
|
{
|
|
1740
1974
|
const fieldValue = request.parent;
|
|
1741
1975
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1746,10 +1980,13 @@ class StorageControlClient {
|
|
|
1746
1980
|
}
|
|
1747
1981
|
}
|
|
1748
1982
|
}
|
|
1749
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1983
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1984
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1750
1985
|
const defaultCallSettings = this._defaults['listManagedFolders'];
|
|
1751
1986
|
const callSettings = defaultCallSettings.merge(options);
|
|
1752
|
-
this.initialize().catch(err => {
|
|
1987
|
+
this.initialize().catch(err => {
|
|
1988
|
+
throw err;
|
|
1989
|
+
});
|
|
1753
1990
|
this._log.info('listManagedFolders iterate %j', request);
|
|
1754
1991
|
return this.descriptors.page.listManagedFolders.asyncIterate(this.innerApiCalls['listManagedFolders'], request, callSettings);
|
|
1755
1992
|
}
|
|
@@ -1769,7 +2006,7 @@ class StorageControlClient {
|
|
|
1769
2006
|
options = options || {};
|
|
1770
2007
|
options.otherArgs = options.otherArgs || {};
|
|
1771
2008
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1772
|
-
|
|
2009
|
+
const routingParameter = {};
|
|
1773
2010
|
{
|
|
1774
2011
|
const fieldValue = request.parent;
|
|
1775
2012
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1780,8 +2017,11 @@ class StorageControlClient {
|
|
|
1780
2017
|
}
|
|
1781
2018
|
}
|
|
1782
2019
|
}
|
|
1783
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1784
|
-
|
|
2020
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2021
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
2022
|
+
this.initialize().catch(err => {
|
|
2023
|
+
throw err;
|
|
2024
|
+
});
|
|
1785
2025
|
const wrappedCallback = callback
|
|
1786
2026
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
1787
2027
|
this._log.info('listAnywhereCaches values %j', values);
|
|
@@ -1830,7 +2070,7 @@ class StorageControlClient {
|
|
|
1830
2070
|
options = options || {};
|
|
1831
2071
|
options.otherArgs = options.otherArgs || {};
|
|
1832
2072
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1833
|
-
|
|
2073
|
+
const routingParameter = {};
|
|
1834
2074
|
{
|
|
1835
2075
|
const fieldValue = request.parent;
|
|
1836
2076
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1841,10 +2081,13 @@ class StorageControlClient {
|
|
|
1841
2081
|
}
|
|
1842
2082
|
}
|
|
1843
2083
|
}
|
|
1844
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2084
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2085
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1845
2086
|
const defaultCallSettings = this._defaults['listAnywhereCaches'];
|
|
1846
2087
|
const callSettings = defaultCallSettings.merge(options);
|
|
1847
|
-
this.initialize().catch(err => {
|
|
2088
|
+
this.initialize().catch(err => {
|
|
2089
|
+
throw err;
|
|
2090
|
+
});
|
|
1848
2091
|
this._log.info('listAnywhereCaches stream %j', request);
|
|
1849
2092
|
return this.descriptors.page.listAnywhereCaches.createStream(this.innerApiCalls.listAnywhereCaches, request, callSettings);
|
|
1850
2093
|
}
|
|
@@ -1885,7 +2128,7 @@ class StorageControlClient {
|
|
|
1885
2128
|
options = options || {};
|
|
1886
2129
|
options.otherArgs = options.otherArgs || {};
|
|
1887
2130
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1888
|
-
|
|
2131
|
+
const routingParameter = {};
|
|
1889
2132
|
{
|
|
1890
2133
|
const fieldValue = request.parent;
|
|
1891
2134
|
if (fieldValue !== undefined && fieldValue !== null) {
|
|
@@ -1896,43 +2139,46 @@ class StorageControlClient {
|
|
|
1896
2139
|
}
|
|
1897
2140
|
}
|
|
1898
2141
|
}
|
|
1899
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2142
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2143
|
+
this._gaxModule.routingHeader.fromParams(routingParameter);
|
|
1900
2144
|
const defaultCallSettings = this._defaults['listAnywhereCaches'];
|
|
1901
2145
|
const callSettings = defaultCallSettings.merge(options);
|
|
1902
|
-
this.initialize().catch(err => {
|
|
2146
|
+
this.initialize().catch(err => {
|
|
2147
|
+
throw err;
|
|
2148
|
+
});
|
|
1903
2149
|
this._log.info('listAnywhereCaches iterate %j', request);
|
|
1904
2150
|
return this.descriptors.page.listAnywhereCaches.asyncIterate(this.innerApiCalls['listAnywhereCaches'], request, callSettings);
|
|
1905
2151
|
}
|
|
1906
2152
|
/**
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
2153
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
|
2154
|
+
* method to poll the operation result at intervals as recommended by the API
|
|
2155
|
+
* service.
|
|
2156
|
+
*
|
|
2157
|
+
* @param {Object} request - The request object that will be sent.
|
|
2158
|
+
* @param {string} request.name - The name of the operation resource.
|
|
2159
|
+
* @param {Object=} options
|
|
2160
|
+
* Optional parameters. You can override the default settings for this call,
|
|
2161
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
2162
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
2163
|
+
* for the details.
|
|
2164
|
+
* @param {function(?Error, ?Object)=} callback
|
|
2165
|
+
* The function which will be called with the result of the API call.
|
|
2166
|
+
*
|
|
2167
|
+
* The second parameter to the callback is an object representing
|
|
2168
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
2169
|
+
* @return {Promise} - The promise which resolves to an array.
|
|
2170
|
+
* The first element of the array is an object representing
|
|
2171
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
2172
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
2173
|
+
*
|
|
2174
|
+
* @example
|
|
2175
|
+
* ```
|
|
2176
|
+
* const client = longrunning.operationsClient();
|
|
2177
|
+
* const name = '';
|
|
2178
|
+
* const [response] = await client.getOperation({name});
|
|
2179
|
+
* // doThingsWith(response)
|
|
2180
|
+
* ```
|
|
2181
|
+
*/
|
|
1936
2182
|
getOperation(request, optionsOrCallback, callback) {
|
|
1937
2183
|
let options;
|
|
1938
2184
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -2109,7 +2355,8 @@ class StorageControlClient {
|
|
|
2109
2355
|
* @returns {string} A string representing the project.
|
|
2110
2356
|
*/
|
|
2111
2357
|
matchProjectFromAnywhereCacheName(anywhereCacheName) {
|
|
2112
|
-
return this.pathTemplates.anywhereCachePathTemplate.match(anywhereCacheName)
|
|
2358
|
+
return this.pathTemplates.anywhereCachePathTemplate.match(anywhereCacheName)
|
|
2359
|
+
.project;
|
|
2113
2360
|
}
|
|
2114
2361
|
/**
|
|
2115
2362
|
* Parse the bucket from AnywhereCache resource.
|
|
@@ -2119,7 +2366,8 @@ class StorageControlClient {
|
|
|
2119
2366
|
* @returns {string} A string representing the bucket.
|
|
2120
2367
|
*/
|
|
2121
2368
|
matchBucketFromAnywhereCacheName(anywhereCacheName) {
|
|
2122
|
-
return this.pathTemplates.anywhereCachePathTemplate.match(anywhereCacheName)
|
|
2369
|
+
return this.pathTemplates.anywhereCachePathTemplate.match(anywhereCacheName)
|
|
2370
|
+
.bucket;
|
|
2123
2371
|
}
|
|
2124
2372
|
/**
|
|
2125
2373
|
* Parse the anywhere_cache from AnywhereCache resource.
|
|
@@ -2129,7 +2377,8 @@ class StorageControlClient {
|
|
|
2129
2377
|
* @returns {string} A string representing the anywhere_cache.
|
|
2130
2378
|
*/
|
|
2131
2379
|
matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName) {
|
|
2132
|
-
return this.pathTemplates.anywhereCachePathTemplate.match(anywhereCacheName)
|
|
2380
|
+
return this.pathTemplates.anywhereCachePathTemplate.match(anywhereCacheName)
|
|
2381
|
+
.anywhere_cache;
|
|
2133
2382
|
}
|
|
2134
2383
|
/**
|
|
2135
2384
|
* Return a fully-qualified bucket resource name string.
|
|
@@ -2265,7 +2514,8 @@ class StorageControlClient {
|
|
|
2265
2514
|
* @returns {string} A string representing the project.
|
|
2266
2515
|
*/
|
|
2267
2516
|
matchProjectFromManagedFolderName(managedFolderName) {
|
|
2268
|
-
return this.pathTemplates.managedFolderPathTemplate.match(managedFolderName)
|
|
2517
|
+
return this.pathTemplates.managedFolderPathTemplate.match(managedFolderName)
|
|
2518
|
+
.project;
|
|
2269
2519
|
}
|
|
2270
2520
|
/**
|
|
2271
2521
|
* Parse the bucket from ManagedFolder resource.
|
|
@@ -2275,7 +2525,8 @@ class StorageControlClient {
|
|
|
2275
2525
|
* @returns {string} A string representing the bucket.
|
|
2276
2526
|
*/
|
|
2277
2527
|
matchBucketFromManagedFolderName(managedFolderName) {
|
|
2278
|
-
return this.pathTemplates.managedFolderPathTemplate.match(managedFolderName)
|
|
2528
|
+
return this.pathTemplates.managedFolderPathTemplate.match(managedFolderName)
|
|
2529
|
+
.bucket;
|
|
2279
2530
|
}
|
|
2280
2531
|
/**
|
|
2281
2532
|
* Parse the managed_folder from ManagedFolder resource.
|
|
@@ -2285,7 +2536,8 @@ class StorageControlClient {
|
|
|
2285
2536
|
* @returns {string} A string representing the managed_folder.
|
|
2286
2537
|
*/
|
|
2287
2538
|
matchManagedFolderFromManagedFolderName(managedFolderName) {
|
|
2288
|
-
return this.pathTemplates.managedFolderPathTemplate.match(managedFolderName)
|
|
2539
|
+
return this.pathTemplates.managedFolderPathTemplate.match(managedFolderName)
|
|
2540
|
+
.managed_folder;
|
|
2289
2541
|
}
|
|
2290
2542
|
/**
|
|
2291
2543
|
* Return a fully-qualified orgLocationIntelligenceConfig resource name string.
|
|
@@ -2395,7 +2647,8 @@ class StorageControlClient {
|
|
|
2395
2647
|
* @returns {string} A string representing the project.
|
|
2396
2648
|
*/
|
|
2397
2649
|
matchProjectFromStorageLayoutName(storageLayoutName) {
|
|
2398
|
-
return this.pathTemplates.storageLayoutPathTemplate.match(storageLayoutName)
|
|
2650
|
+
return this.pathTemplates.storageLayoutPathTemplate.match(storageLayoutName)
|
|
2651
|
+
.project;
|
|
2399
2652
|
}
|
|
2400
2653
|
/**
|
|
2401
2654
|
* Parse the bucket from StorageLayout resource.
|
|
@@ -2405,7 +2658,8 @@ class StorageControlClient {
|
|
|
2405
2658
|
* @returns {string} A string representing the bucket.
|
|
2406
2659
|
*/
|
|
2407
2660
|
matchBucketFromStorageLayoutName(storageLayoutName) {
|
|
2408
|
-
return this.pathTemplates.storageLayoutPathTemplate.match(storageLayoutName)
|
|
2661
|
+
return this.pathTemplates.storageLayoutPathTemplate.match(storageLayoutName)
|
|
2662
|
+
.bucket;
|
|
2409
2663
|
}
|
|
2410
2664
|
/**
|
|
2411
2665
|
* Terminate the gRPC channel and close the client.
|