@google-cloud/storage-control 0.6.0 → 0.7.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.
Files changed (38) hide show
  1. package/README.md +59 -74
  2. package/build/protos/google/storage/v2/storage.proto +3161 -0
  3. package/build/protos/protos.d.ts +10641 -0
  4. package/build/protos/protos.js +28904 -0
  5. package/build/protos/protos.json +4286 -4
  6. package/build/src/index.d.ts +2 -3
  7. package/build/src/index.js +3 -3
  8. package/build/src/index.js.map +1 -1
  9. package/build/src/storage_control_client.d.ts +2035 -0
  10. package/build/src/storage_control_client.js +1387 -0
  11. package/build/src/storage_control_client.js.map +1 -0
  12. package/build/src/util/ast_utils.d.ts +22 -0
  13. package/build/src/util/ast_utils.js +352 -0
  14. package/build/src/util/ast_utils.js.map +1 -0
  15. package/build/src/util/index_fix_utils.d.ts +15 -0
  16. package/build/src/util/index_fix_utils.js +86 -0
  17. package/build/src/util/index_fix_utils.js.map +1 -0
  18. package/build/src/util/proto_utils.d.ts +13 -0
  19. package/build/src/util/proto_utils.js +53 -0
  20. package/build/src/util/proto_utils.js.map +1 -0
  21. package/build/src/util/storage_control_utils.d.ts +1 -0
  22. package/build/src/util/storage_control_utils.js +31 -0
  23. package/build/src/util/storage_control_utils.js.map +1 -0
  24. package/build/src/util/uber_client_builder.d.ts +12 -0
  25. package/build/src/util/uber_client_builder.js +187 -0
  26. package/build/src/util/uber_client_builder.js.map +1 -0
  27. package/build/src/v2/index.d.ts +1 -0
  28. package/build/src/v2/index.js +3 -1
  29. package/build/src/v2/index.js.map +1 -1
  30. package/build/src/v2/storage_client.d.ts +614 -0
  31. package/build/src/v2/storage_client.js +911 -0
  32. package/build/src/v2/storage_client.js.map +1 -0
  33. package/build/src/v2/storage_client_config.json +65 -0
  34. package/build/src/v2/storage_control_client.d.ts +138 -138
  35. package/build/src/v2/storage_control_client.js +485 -231
  36. package/build/src/v2/storage_control_client.js.map +1 -1
  37. package/build/src/v2/storage_proto_list.json +3 -0
  38. package/package.json +4 -2
@@ -0,0 +1,1387 @@
1
+ "use strict";
2
+ // Copyright 2025 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated **
17
+ // ** All changes to this file may be overwritten. **
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.StorageControlClient = void 0;
20
+ const storage_control_client_1 = require("./v2/storage_control_client");
21
+ const storage_client_1 = require("./v2/storage_client");
22
+ class StorageControlClient {
23
+ storageControlInternal;
24
+ storageClient;
25
+ auth;
26
+ descriptors = {
27
+ page: {},
28
+ stream: {},
29
+ longrunning: {},
30
+ batching: {},
31
+ };
32
+ warn;
33
+ innerApiCalls;
34
+ pathTemplates;
35
+ operationsClient;
36
+ storageControlStub;
37
+ /**
38
+ * @param {object} [StorageControlClientOptions] - Enables user to instantiate clients separately and use those as the subclients.
39
+ * To have sub-clients with different options, instantiate each client separately.
40
+ */
41
+ constructor(options) {
42
+ options = options || {};
43
+ this.storageControlInternal =
44
+ options?.storageControlInternal ?? new storage_control_client_1.StorageControlClient(options);
45
+ // utilize whatever auth was created with the first client for the rest of the clients
46
+ // this will either be what the user passed into options.auth, or whatever was
47
+ // initialized by default in gax. We reuse this auth rather than instantiating a default ourselves
48
+ // so that we do not have to keep this code in sync with gax
49
+ options.auth = this.storageControlInternal.auth;
50
+ this.storageClient = options?.storageClient ?? new storage_client_1.StorageClient(options);
51
+ this.auth = this.storageControlInternal.auth;
52
+ this.descriptors = this.storageControlInternal.descriptors;
53
+ this.warn = this.storageControlInternal.warn;
54
+ this.innerApiCalls = this.storageControlInternal.innerApiCalls;
55
+ this.pathTemplates = this.storageControlInternal.pathTemplates;
56
+ this.operationsClient = this.storageControlInternal.operationsClient;
57
+ this.storageControlStub = this.storageControlInternal.storageControlStub;
58
+ }
59
+ /**
60
+ * Initialize the client.
61
+ * Performs asynchronous operations (such as authentication) and prepares the client.
62
+ * This function will be called automatically when any class method is called for the
63
+ * first time, but if you need to initialize it before calling an actual method,
64
+ * feel free to call initialize() directly.
65
+ *
66
+ * You can await on this method if you want to make sure the client is initialized.
67
+ *
68
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
69
+ */
70
+ initialize() {
71
+ return this.storageControlInternal.initialize();
72
+ }
73
+ /**
74
+ * The DNS address for this API service.
75
+ * @deprecated Use the apiEndpoint method of the client instance.
76
+ * @returns {string} The DNS address for this service.
77
+ */
78
+ static get servicePath() {
79
+ return storage_control_client_1.StorageControlClient.servicePath;
80
+ }
81
+ /**
82
+ * The DNS address for this API service - same as servicePath.
83
+ * @deprecated Use the apiEndpoint method of the client instance.
84
+ * @returns {string} The DNS address for this service.
85
+ */
86
+ static get apiEndpoint() {
87
+ return storage_control_client_1.StorageControlClient.apiEndpoint;
88
+ }
89
+ /**
90
+ * The DNS address for this API service - same as servicePath.
91
+ * @deprecated Use the apiEndpoint method of the client instance.
92
+ * @returns {string} The DNS address for this service.
93
+ */
94
+ get apiEndpoint() {
95
+ return this.storageControlInternal.apiEndpoint;
96
+ }
97
+ get universeDomain() {
98
+ return this.storageControlInternal.universeDomain;
99
+ }
100
+ /**
101
+ * The port for this API service.
102
+ * @returns {number} The default port for this service.
103
+ */
104
+ static get port() {
105
+ return storage_control_client_1.StorageControlClient.port;
106
+ }
107
+ /**
108
+ * The scopes needed to make gRPC calls for every method defined
109
+ * in this service.
110
+ * @returns {string[]} List of default scopes.
111
+ */
112
+ static get scopes() {
113
+ return storage_control_client_1.StorageControlClient.scopes;
114
+ }
115
+ getProjectId(callback) {
116
+ if (callback) {
117
+ this.storageControlInternal.getProjectId(callback);
118
+ return;
119
+ }
120
+ return this.storageControlInternal.getProjectId();
121
+ }
122
+ createFolder(request, optionsOrCallback, callback) {
123
+ request = request || {};
124
+ let options;
125
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
126
+ callback = optionsOrCallback;
127
+ options = {};
128
+ }
129
+ else {
130
+ options = optionsOrCallback;
131
+ }
132
+ if (callback === undefined) {
133
+ return this.storageControlInternal.createFolder(request, options);
134
+ }
135
+ return this.storageControlInternal.createFolder(request, options, callback);
136
+ }
137
+ deleteFolder(request, optionsOrCallback, callback) {
138
+ request = request || {};
139
+ let options;
140
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
141
+ callback = optionsOrCallback;
142
+ options = {};
143
+ }
144
+ else {
145
+ options = optionsOrCallback;
146
+ }
147
+ if (callback === undefined) {
148
+ return this.storageControlInternal.deleteFolder(request, options);
149
+ }
150
+ return this.storageControlInternal.deleteFolder(request, options, callback);
151
+ }
152
+ getFolder(request, optionsOrCallback, callback) {
153
+ request = request || {};
154
+ let options;
155
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
156
+ callback = optionsOrCallback;
157
+ options = {};
158
+ }
159
+ else {
160
+ options = optionsOrCallback;
161
+ }
162
+ if (callback === undefined) {
163
+ return this.storageControlInternal.getFolder(request, options);
164
+ }
165
+ return this.storageControlInternal.getFolder(request, options, callback);
166
+ }
167
+ getStorageLayout(request, optionsOrCallback, callback) {
168
+ request = request || {};
169
+ let options;
170
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
171
+ callback = optionsOrCallback;
172
+ options = {};
173
+ }
174
+ else {
175
+ options = optionsOrCallback;
176
+ }
177
+ if (callback === undefined) {
178
+ return this.storageControlInternal.getStorageLayout(request, options);
179
+ }
180
+ return this.storageControlInternal.getStorageLayout(request, options, callback);
181
+ }
182
+ createManagedFolder(request, optionsOrCallback, callback) {
183
+ request = request || {};
184
+ let options;
185
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
186
+ callback = optionsOrCallback;
187
+ options = {};
188
+ }
189
+ else {
190
+ options = optionsOrCallback;
191
+ }
192
+ if (callback === undefined) {
193
+ return this.storageControlInternal.createManagedFolder(request, options);
194
+ }
195
+ return this.storageControlInternal.createManagedFolder(request, options, callback);
196
+ }
197
+ deleteManagedFolder(request, optionsOrCallback, callback) {
198
+ request = request || {};
199
+ let options;
200
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
201
+ callback = optionsOrCallback;
202
+ options = {};
203
+ }
204
+ else {
205
+ options = optionsOrCallback;
206
+ }
207
+ if (callback === undefined) {
208
+ return this.storageControlInternal.deleteManagedFolder(request, options);
209
+ }
210
+ return this.storageControlInternal.deleteManagedFolder(request, options, callback);
211
+ }
212
+ getManagedFolder(request, optionsOrCallback, callback) {
213
+ request = request || {};
214
+ let options;
215
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
216
+ callback = optionsOrCallback;
217
+ options = {};
218
+ }
219
+ else {
220
+ options = optionsOrCallback;
221
+ }
222
+ if (callback === undefined) {
223
+ return this.storageControlInternal.getManagedFolder(request, options);
224
+ }
225
+ return this.storageControlInternal.getManagedFolder(request, options, callback);
226
+ }
227
+ disableAnywhereCache(request, optionsOrCallback, callback) {
228
+ request = request || {};
229
+ let options;
230
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
231
+ callback = optionsOrCallback;
232
+ options = {};
233
+ }
234
+ else {
235
+ options = optionsOrCallback;
236
+ }
237
+ if (callback === undefined) {
238
+ return this.storageControlInternal.disableAnywhereCache(request, options);
239
+ }
240
+ return this.storageControlInternal.disableAnywhereCache(request, options, callback);
241
+ }
242
+ pauseAnywhereCache(request, optionsOrCallback, callback) {
243
+ request = request || {};
244
+ let options;
245
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
246
+ callback = optionsOrCallback;
247
+ options = {};
248
+ }
249
+ else {
250
+ options = optionsOrCallback;
251
+ }
252
+ if (callback === undefined) {
253
+ return this.storageControlInternal.pauseAnywhereCache(request, options);
254
+ }
255
+ return this.storageControlInternal.pauseAnywhereCache(request, options, callback);
256
+ }
257
+ resumeAnywhereCache(request, optionsOrCallback, callback) {
258
+ request = request || {};
259
+ let options;
260
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
261
+ callback = optionsOrCallback;
262
+ options = {};
263
+ }
264
+ else {
265
+ options = optionsOrCallback;
266
+ }
267
+ if (callback === undefined) {
268
+ return this.storageControlInternal.resumeAnywhereCache(request, options);
269
+ }
270
+ return this.storageControlInternal.resumeAnywhereCache(request, options, callback);
271
+ }
272
+ getAnywhereCache(request, optionsOrCallback, callback) {
273
+ request = request || {};
274
+ let options;
275
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
276
+ callback = optionsOrCallback;
277
+ options = {};
278
+ }
279
+ else {
280
+ options = optionsOrCallback;
281
+ }
282
+ if (callback === undefined) {
283
+ return this.storageControlInternal.getAnywhereCache(request, options);
284
+ }
285
+ return this.storageControlInternal.getAnywhereCache(request, options, callback);
286
+ }
287
+ getProjectIntelligenceConfig(request, optionsOrCallback, callback) {
288
+ request = request || {};
289
+ let options;
290
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
291
+ callback = optionsOrCallback;
292
+ options = {};
293
+ }
294
+ else {
295
+ options = optionsOrCallback;
296
+ }
297
+ if (callback === undefined) {
298
+ return this.storageControlInternal.getProjectIntelligenceConfig(request, options);
299
+ }
300
+ return this.storageControlInternal.getProjectIntelligenceConfig(request, options, callback);
301
+ }
302
+ updateProjectIntelligenceConfig(request, optionsOrCallback, callback) {
303
+ request = request || {};
304
+ let options;
305
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
306
+ callback = optionsOrCallback;
307
+ options = {};
308
+ }
309
+ else {
310
+ options = optionsOrCallback;
311
+ }
312
+ if (callback === undefined) {
313
+ return this.storageControlInternal.updateProjectIntelligenceConfig(request, options);
314
+ }
315
+ return this.storageControlInternal.updateProjectIntelligenceConfig(request, options, callback);
316
+ }
317
+ getFolderIntelligenceConfig(request, optionsOrCallback, callback) {
318
+ request = request || {};
319
+ let options;
320
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
321
+ callback = optionsOrCallback;
322
+ options = {};
323
+ }
324
+ else {
325
+ options = optionsOrCallback;
326
+ }
327
+ if (callback === undefined) {
328
+ return this.storageControlInternal.getFolderIntelligenceConfig(request, options);
329
+ }
330
+ return this.storageControlInternal.getFolderIntelligenceConfig(request, options, callback);
331
+ }
332
+ updateFolderIntelligenceConfig(request, optionsOrCallback, callback) {
333
+ request = request || {};
334
+ let options;
335
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
336
+ callback = optionsOrCallback;
337
+ options = {};
338
+ }
339
+ else {
340
+ options = optionsOrCallback;
341
+ }
342
+ if (callback === undefined) {
343
+ return this.storageControlInternal.updateFolderIntelligenceConfig(request, options);
344
+ }
345
+ return this.storageControlInternal.updateFolderIntelligenceConfig(request, options, callback);
346
+ }
347
+ getOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
348
+ request = request || {};
349
+ let options;
350
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
351
+ callback = optionsOrCallback;
352
+ options = {};
353
+ }
354
+ else {
355
+ options = optionsOrCallback;
356
+ }
357
+ if (callback === undefined) {
358
+ return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options);
359
+ }
360
+ return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options, callback);
361
+ }
362
+ updateOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
363
+ request = request || {};
364
+ let options;
365
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
366
+ callback = optionsOrCallback;
367
+ options = {};
368
+ }
369
+ else {
370
+ options = optionsOrCallback;
371
+ }
372
+ if (callback === undefined) {
373
+ return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options);
374
+ }
375
+ return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options, callback);
376
+ }
377
+ getIamPolicy(request, optionsOrCallback, callback) {
378
+ request = request || {};
379
+ let options;
380
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
381
+ callback = optionsOrCallback;
382
+ options = {};
383
+ }
384
+ else {
385
+ options = optionsOrCallback;
386
+ }
387
+ if (callback === undefined) {
388
+ return this.storageControlInternal.getIamPolicy(request, options);
389
+ }
390
+ return this.storageControlInternal.getIamPolicy(request, options, callback);
391
+ }
392
+ setIamPolicy(request, optionsOrCallback, callback) {
393
+ request = request || {};
394
+ let options;
395
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
396
+ callback = optionsOrCallback;
397
+ options = {};
398
+ }
399
+ else {
400
+ options = optionsOrCallback;
401
+ }
402
+ if (callback === undefined) {
403
+ return this.storageControlInternal.setIamPolicy(request, options);
404
+ }
405
+ return this.storageControlInternal.setIamPolicy(request, options, callback);
406
+ }
407
+ testIamPermissions(request, optionsOrCallback, callback) {
408
+ request = request || {};
409
+ let options;
410
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
411
+ callback = optionsOrCallback;
412
+ options = {};
413
+ }
414
+ else {
415
+ options = optionsOrCallback;
416
+ }
417
+ if (callback === undefined) {
418
+ return this.storageControlInternal.testIamPermissions(request, options);
419
+ }
420
+ return this.storageControlInternal.testIamPermissions(request, options, callback);
421
+ }
422
+ renameFolder(request, optionsOrCallback, callback) {
423
+ request = request || {};
424
+ let options;
425
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
426
+ callback = optionsOrCallback;
427
+ options = {};
428
+ }
429
+ else {
430
+ options = optionsOrCallback;
431
+ }
432
+ if (callback === undefined) {
433
+ return this.storageControlInternal.renameFolder(request, options);
434
+ }
435
+ return this.storageControlInternal.renameFolder(request, options, callback);
436
+ }
437
+ /**
438
+ * Check the status of the long running operation returned by `renameFolder()`.
439
+ * @param {String} name
440
+ * The operation name that will be passed.
441
+ * @returns {Promise} - The promise which resolves to an object.
442
+ * The decoded operation object has result and metadata field to get information from.
443
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
444
+ * for more details and examples.
445
+ * @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
446
+ * region_tag:storage_v2_generated_StorageControl_RenameFolder_async
447
+ */
448
+ checkRenameFolderProgress(name) {
449
+ return this.storageControlInternal.checkRenameFolderProgress(name);
450
+ }
451
+ createAnywhereCache(request, optionsOrCallback, callback) {
452
+ request = request || {};
453
+ let options;
454
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
455
+ callback = optionsOrCallback;
456
+ options = {};
457
+ }
458
+ else {
459
+ options = optionsOrCallback;
460
+ }
461
+ if (callback === undefined) {
462
+ return this.storageControlInternal.createAnywhereCache(request, options);
463
+ }
464
+ return this.storageControlInternal.createAnywhereCache(request, options, callback);
465
+ }
466
+ /**
467
+ * Check the status of the long running operation returned by `createAnywhereCache()`.
468
+ * @param {String} name
469
+ * The operation name that will be passed.
470
+ * @returns {Promise} - The promise which resolves to an object.
471
+ * The decoded operation object has result and metadata field to get information from.
472
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
473
+ * for more details and examples.
474
+ * @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
475
+ * region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
476
+ */
477
+ checkCreateAnywhereCacheProgress(name) {
478
+ return this.storageControlInternal.checkCreateAnywhereCacheProgress(name);
479
+ }
480
+ updateAnywhereCache(request, optionsOrCallback, callback) {
481
+ request = request || {};
482
+ let options;
483
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
484
+ callback = optionsOrCallback;
485
+ options = {};
486
+ }
487
+ else {
488
+ options = optionsOrCallback;
489
+ }
490
+ if (callback === undefined) {
491
+ return this.storageControlInternal.updateAnywhereCache(request, options);
492
+ }
493
+ return this.storageControlInternal.updateAnywhereCache(request, options, callback);
494
+ }
495
+ /**
496
+ * Check the status of the long running operation returned by `updateAnywhereCache()`.
497
+ * @param {String} name
498
+ * The operation name that will be passed.
499
+ * @returns {Promise} - The promise which resolves to an object.
500
+ * The decoded operation object has result and metadata field to get information from.
501
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
502
+ * for more details and examples.
503
+ * @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
504
+ * region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
505
+ */
506
+ checkUpdateAnywhereCacheProgress(name) {
507
+ return this.storageControlInternal.checkUpdateAnywhereCacheProgress(name);
508
+ }
509
+ listFolders(request, optionsOrCallback, callback) {
510
+ request = request || {};
511
+ let options;
512
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
513
+ callback = optionsOrCallback;
514
+ options = {};
515
+ }
516
+ else {
517
+ options = optionsOrCallback;
518
+ }
519
+ if (callback === undefined) {
520
+ return this.storageControlInternal.listFolders(request, options);
521
+ }
522
+ return this.storageControlInternal.listFolders(request, options, callback);
523
+ }
524
+ /**
525
+ * Equivalent to `listFolders`, but returns a NodeJS Stream object.
526
+ * @param {Object} request
527
+ * The request object that will be sent.
528
+ * @param {string} request.parent
529
+ * Required. Name of the bucket in which to look for folders. The bucket must
530
+ * be a hierarchical namespace enabled bucket.
531
+ * @param {number} [request.pageSize]
532
+ * Optional. Maximum number of folders to return in a single response. The
533
+ * service will use this parameter or 1,000 items, whichever is smaller.
534
+ * @param {string} [request.pageToken]
535
+ * Optional. A previously-returned page token representing part of the larger
536
+ * set of results to view.
537
+ * @param {string} [request.prefix]
538
+ * Optional. Filter results to folders whose names begin with this prefix.
539
+ * If set, the value must either be an empty string or end with a '/'.
540
+ * @param {string} [request.delimiter]
541
+ * Optional. If set, returns results in a directory-like mode. The results
542
+ * will only include folders that either exactly match the above prefix, or
543
+ * are one level below the prefix. The only supported value is '/'.
544
+ * @param {string} [request.lexicographicStart]
545
+ * Optional. Filter results to folders whose names are lexicographically equal
546
+ * to or after lexicographic_start. If lexicographic_end is also set, the
547
+ * folders listed have names between lexicographic_start (inclusive) and
548
+ * lexicographic_end (exclusive).
549
+ * @param {string} [request.lexicographicEnd]
550
+ * Optional. Filter results to folders whose names are lexicographically
551
+ * before lexicographic_end. If lexicographic_start is also set, the folders
552
+ * listed have names between lexicographic_start (inclusive) and
553
+ * lexicographic_end (exclusive).
554
+ * @param {string} [request.requestId]
555
+ * Optional. A unique identifier for this request. UUID is the recommended
556
+ * format, but other formats are still accepted.
557
+ * @param {object} [options]
558
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
559
+ * @returns {Stream}
560
+ * An object stream which emits an object representing {@link protos.google.storage.control.v2.Folder|Folder} on 'data' event.
561
+ * The client library will perform auto-pagination by default: it will call the API as many
562
+ * times as needed. Note that it can affect your quota.
563
+ * We recommend using `listFoldersAsync()`
564
+ * method described below for async iteration which you can stop as needed.
565
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
566
+ * for more details and examples.
567
+ */
568
+ listFoldersStream(request, options) {
569
+ return this.storageControlInternal.listFoldersStream(request, options);
570
+ }
571
+ /**
572
+ * Equivalent to `listFolders`, but returns an iterable object.
573
+ *
574
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
575
+ * @param {Object} request
576
+ * The request object that will be sent.
577
+ * @param {string} request.parent
578
+ * Required. Name of the bucket in which to look for folders. The bucket must
579
+ * be a hierarchical namespace enabled bucket.
580
+ * @param {number} [request.pageSize]
581
+ * Optional. Maximum number of folders to return in a single response. The
582
+ * service will use this parameter or 1,000 items, whichever is smaller.
583
+ * @param {string} [request.pageToken]
584
+ * Optional. A previously-returned page token representing part of the larger
585
+ * set of results to view.
586
+ * @param {string} [request.prefix]
587
+ * Optional. Filter results to folders whose names begin with this prefix.
588
+ * If set, the value must either be an empty string or end with a '/'.
589
+ * @param {string} [request.delimiter]
590
+ * Optional. If set, returns results in a directory-like mode. The results
591
+ * will only include folders that either exactly match the above prefix, or
592
+ * are one level below the prefix. The only supported value is '/'.
593
+ * @param {string} [request.lexicographicStart]
594
+ * Optional. Filter results to folders whose names are lexicographically equal
595
+ * to or after lexicographic_start. If lexicographic_end is also set, the
596
+ * folders listed have names between lexicographic_start (inclusive) and
597
+ * lexicographic_end (exclusive).
598
+ * @param {string} [request.lexicographicEnd]
599
+ * Optional. Filter results to folders whose names are lexicographically
600
+ * before lexicographic_end. If lexicographic_start is also set, the folders
601
+ * listed have names between lexicographic_start (inclusive) and
602
+ * lexicographic_end (exclusive).
603
+ * @param {string} [request.requestId]
604
+ * Optional. A unique identifier for this request. UUID is the recommended
605
+ * format, but other formats are still accepted.
606
+ * @param {object} [options]
607
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
608
+ * @returns {Object}
609
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
610
+ * When you iterate the returned iterable, each element will be an object representing
611
+ * {@link protos.google.storage.control.v2.Folder|Folder}. The API will be called under the hood as needed, once per the page,
612
+ * so you can stop the iteration when you don't need more results.
613
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
614
+ * for more details and examples.
615
+ * @example <caption>include:samples/generated/v2/storage_control.list_folders.js</caption>
616
+ * region_tag:storage_v2_generated_StorageControl_ListFolders_async
617
+ */
618
+ listFoldersAsync(request, options) {
619
+ return this.storageControlInternal.listFoldersAsync(request, options);
620
+ }
621
+ listManagedFolders(request, optionsOrCallback, callback) {
622
+ request = request || {};
623
+ let options;
624
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
625
+ callback = optionsOrCallback;
626
+ options = {};
627
+ }
628
+ else {
629
+ options = optionsOrCallback;
630
+ }
631
+ if (callback === undefined) {
632
+ return this.storageControlInternal.listManagedFolders(request, options);
633
+ }
634
+ return this.storageControlInternal.listManagedFolders(request, options, callback);
635
+ }
636
+ /**
637
+ * Equivalent to `listManagedFolders`, but returns a NodeJS Stream object.
638
+ * @param {Object} request
639
+ * The request object that will be sent.
640
+ * @param {string} request.parent
641
+ * Required. Name of the bucket this managed folder belongs to.
642
+ * @param {number} [request.pageSize]
643
+ * Optional. Maximum number of managed folders to return in a single response.
644
+ * The service will use this parameter or 1,000 items, whichever is smaller.
645
+ * @param {string} [request.pageToken]
646
+ * Optional. A previously-returned page token representing part of the larger
647
+ * set of results to view.
648
+ * @param {string} [request.prefix]
649
+ * Optional. Filter results to match managed folders with name starting with
650
+ * this prefix.
651
+ * @param {string} [request.requestId]
652
+ * Optional. A unique identifier for this request. UUID is the recommended
653
+ * format, but other formats are still accepted.
654
+ * @param {object} [options]
655
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
656
+ * @returns {Stream}
657
+ * An object stream which emits an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder} on 'data' event.
658
+ * The client library will perform auto-pagination by default: it will call the API as many
659
+ * times as needed. Note that it can affect your quota.
660
+ * We recommend using `listManagedFoldersAsync()`
661
+ * method described below for async iteration which you can stop as needed.
662
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
663
+ * for more details and examples.
664
+ */
665
+ listManagedFoldersStream(request, options) {
666
+ return this.storageControlInternal.listManagedFoldersStream(request, options);
667
+ }
668
+ /**
669
+ * Equivalent to `listManagedFolders`, but returns an iterable object.
670
+ *
671
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
672
+ * @param {Object} request
673
+ * The request object that will be sent.
674
+ * @param {string} request.parent
675
+ * Required. Name of the bucket this managed folder belongs to.
676
+ * @param {number} [request.pageSize]
677
+ * Optional. Maximum number of managed folders to return in a single response.
678
+ * The service will use this parameter or 1,000 items, whichever is smaller.
679
+ * @param {string} [request.pageToken]
680
+ * Optional. A previously-returned page token representing part of the larger
681
+ * set of results to view.
682
+ * @param {string} [request.prefix]
683
+ * Optional. Filter results to match managed folders with name starting with
684
+ * this prefix.
685
+ * @param {string} [request.requestId]
686
+ * Optional. A unique identifier for this request. UUID is the recommended
687
+ * format, but other formats are still accepted.
688
+ * @param {object} [options]
689
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
690
+ * @returns {Object}
691
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
692
+ * When you iterate the returned iterable, each element will be an object representing
693
+ * {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}. The API will be called under the hood as needed, once per the page,
694
+ * so you can stop the iteration when you don't need more results.
695
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
696
+ * for more details and examples.
697
+ * @example <caption>include:samples/generated/v2/storage_control.list_managed_folders.js</caption>
698
+ * region_tag:storage_v2_generated_StorageControl_ListManagedFolders_async
699
+ */
700
+ listManagedFoldersAsync(request, options) {
701
+ return this.storageControlInternal.listManagedFoldersAsync(request, options);
702
+ }
703
+ listAnywhereCaches(request, optionsOrCallback, callback) {
704
+ request = request || {};
705
+ let options;
706
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
707
+ callback = optionsOrCallback;
708
+ options = {};
709
+ }
710
+ else {
711
+ options = optionsOrCallback;
712
+ }
713
+ if (callback === undefined) {
714
+ return this.storageControlInternal.listAnywhereCaches(request, options);
715
+ }
716
+ return this.storageControlInternal.listAnywhereCaches(request, options, callback);
717
+ }
718
+ /**
719
+ * Equivalent to `listAnywhereCaches`, but returns a NodeJS Stream object.
720
+ * @param {Object} request
721
+ * The request object that will be sent.
722
+ * @param {string} request.parent
723
+ * Required. The bucket to which this cache belongs.
724
+ * @param {number} request.pageSize
725
+ * Maximum number of caches to return in a single response.
726
+ * The service will use this parameter or 1,000 items, whichever is smaller.
727
+ * @param {string} request.pageToken
728
+ * A previously-returned page token representing part of the larger set of
729
+ * results to view.
730
+ * @param {string} [request.requestId]
731
+ * Optional. A unique identifier for this request. UUID is the recommended
732
+ * format, but other formats are still accepted.
733
+ * @param {object} [options]
734
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
735
+ * @returns {Stream}
736
+ * An object stream which emits an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache} on 'data' event.
737
+ * The client library will perform auto-pagination by default: it will call the API as many
738
+ * times as needed. Note that it can affect your quota.
739
+ * We recommend using `listAnywhereCachesAsync()`
740
+ * method described below for async iteration which you can stop as needed.
741
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
742
+ * for more details and examples.
743
+ */
744
+ listAnywhereCachesStream(request, options) {
745
+ return this.storageControlInternal.listAnywhereCachesStream(request, options);
746
+ }
747
+ /**
748
+ * Equivalent to `listAnywhereCaches`, but returns an iterable object.
749
+ *
750
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
751
+ * @param {Object} request
752
+ * The request object that will be sent.
753
+ * @param {string} request.parent
754
+ * Required. The bucket to which this cache belongs.
755
+ * @param {number} request.pageSize
756
+ * Maximum number of caches to return in a single response.
757
+ * The service will use this parameter or 1,000 items, whichever is smaller.
758
+ * @param {string} request.pageToken
759
+ * A previously-returned page token representing part of the larger set of
760
+ * results to view.
761
+ * @param {string} [request.requestId]
762
+ * Optional. A unique identifier for this request. UUID is the recommended
763
+ * format, but other formats are still accepted.
764
+ * @param {object} [options]
765
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
766
+ * @returns {Object}
767
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
768
+ * When you iterate the returned iterable, each element will be an object representing
769
+ * {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}. The API will be called under the hood as needed, once per the page,
770
+ * so you can stop the iteration when you don't need more results.
771
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
772
+ * for more details and examples.
773
+ * @example <caption>include:samples/generated/v2/storage_control.list_anywhere_caches.js</caption>
774
+ * region_tag:storage_v2_generated_StorageControl_ListAnywhereCaches_async
775
+ */
776
+ listAnywhereCachesAsync(request, options) {
777
+ return this.storageControlInternal.listAnywhereCachesAsync(request, options);
778
+ }
779
+ getOperation(request, optionsOrCallback, callback) {
780
+ request = request || {};
781
+ let options;
782
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
783
+ callback = optionsOrCallback;
784
+ options = {};
785
+ }
786
+ else {
787
+ options = optionsOrCallback;
788
+ }
789
+ if (callback === undefined) {
790
+ return this.storageControlInternal.getOperation(request, options);
791
+ }
792
+ return this.storageControlInternal.getOperation(request, options, callback);
793
+ }
794
+ /**
795
+ * Lists operations that match the specified filter in the request. If the
796
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
797
+ *
798
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
799
+ *
800
+ * @param {Object} request - The request object that will be sent.
801
+ * @param {string} request.name - The name of the operation collection.
802
+ * @param {string} request.filter - The standard list filter.
803
+ * @param {number=} request.pageSize -
804
+ * The maximum number of resources contained in the underlying API
805
+ * response. If page streaming is performed per-resource, this
806
+ * parameter does not affect the return value. If page streaming is
807
+ * performed per-page, this determines the maximum number of
808
+ * resources in a page.
809
+ * @param {Object=} options
810
+ * Optional parameters. You can override the default settings for this call,
811
+ * e.g, timeout, retries, paginations, etc. See {@link
812
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
813
+ * details.
814
+ * @returns {Object}
815
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
816
+ *
817
+ * @example
818
+ * ```
819
+ * const client = longrunning.operationsClient();
820
+ * for await (const response of client.listOperationsAsync(request));
821
+ * // doThingsWith(response)
822
+ * ```
823
+ */
824
+ listOperationsAsync(request, options) {
825
+ return this.storageControlInternal.listOperationsAsync(request, options);
826
+ }
827
+ cancelOperation(request, optionsOrCallback, callback) {
828
+ request = request || {};
829
+ let options;
830
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
831
+ callback = optionsOrCallback;
832
+ options = {};
833
+ }
834
+ else {
835
+ options = optionsOrCallback;
836
+ }
837
+ if (callback === undefined) {
838
+ return this.storageControlInternal.cancelOperation(request, options);
839
+ }
840
+ return this.storageControlInternal.cancelOperation(request, options, callback);
841
+ }
842
+ deleteOperation(request, optionsOrCallback, callback) {
843
+ request = request || {};
844
+ let options;
845
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
846
+ callback = optionsOrCallback;
847
+ options = {};
848
+ }
849
+ else {
850
+ options = optionsOrCallback;
851
+ }
852
+ if (callback === undefined) {
853
+ return this.storageControlInternal.deleteOperation(request, options);
854
+ }
855
+ return this.storageControlInternal.deleteOperation(request, options, callback);
856
+ }
857
+ // --------------------
858
+ // -- Path templates --
859
+ // --------------------
860
+ /**
861
+ * Return a fully-qualified anywhereCache resource name string.
862
+ *
863
+ * @param {string} project
864
+ * @param {string} bucket
865
+ * @param {string} anywhere_cache
866
+ * @returns {string} Resource name string.
867
+ */
868
+ anywhereCachePath(project, bucket, anywhereCache) {
869
+ return this.storageControlInternal.anywhereCachePath(project, bucket, anywhereCache);
870
+ }
871
+ /**
872
+ * Parse the project from AnywhereCache resource.
873
+ *
874
+ * @param {string} anywhereCacheName
875
+ * A fully-qualified path representing AnywhereCache resource.
876
+ * @returns {string} A string representing the project.
877
+ */
878
+ matchProjectFromAnywhereCacheName(anywhereCacheName) {
879
+ return this.storageControlInternal.matchProjectFromAnywhereCacheName(anywhereCacheName);
880
+ }
881
+ /**
882
+ * Parse the bucket from AnywhereCache resource.
883
+ *
884
+ * @param {string} anywhereCacheName
885
+ * A fully-qualified path representing AnywhereCache resource.
886
+ * @returns {string} A string representing the bucket.
887
+ */
888
+ matchBucketFromAnywhereCacheName(anywhereCacheName) {
889
+ return this.storageControlInternal.matchBucketFromAnywhereCacheName(anywhereCacheName);
890
+ }
891
+ /**
892
+ * Parse the anywhere_cache from AnywhereCache resource.
893
+ *
894
+ * @param {string} anywhereCacheName
895
+ * A fully-qualified path representing AnywhereCache resource.
896
+ * @returns {string} A string representing the anywhere_cache.
897
+ */
898
+ matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName) {
899
+ return this.storageControlInternal.matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName);
900
+ }
901
+ /**
902
+ * Return a fully-qualified bucket resource name string.
903
+ *
904
+ * @param {string} project
905
+ * @param {string} bucket
906
+ * @returns {string} Resource name string.
907
+ */
908
+ bucketPath(project, bucket) {
909
+ return this.storageControlInternal.bucketPath(project, bucket);
910
+ }
911
+ /**
912
+ * Parse the project from Bucket resource.
913
+ *
914
+ * @param {string} bucketName
915
+ * A fully-qualified path representing Bucket resource.
916
+ * @returns {string} A string representing the project.
917
+ */
918
+ matchProjectFromBucketName(bucketName) {
919
+ return this.storageControlInternal.matchProjectFromBucketName(bucketName);
920
+ }
921
+ /**
922
+ * Parse the bucket from Bucket resource.
923
+ *
924
+ * @param {string} bucketName
925
+ * A fully-qualified path representing Bucket resource.
926
+ * @returns {string} A string representing the bucket.
927
+ */
928
+ matchBucketFromBucketName(bucketName) {
929
+ return this.storageControlInternal.matchBucketFromBucketName(bucketName);
930
+ }
931
+ /**
932
+ * Return a fully-qualified folder resource name string.
933
+ *
934
+ * @param {string} project
935
+ * @param {string} bucket
936
+ * @param {string} folder
937
+ * @returns {string} Resource name string.
938
+ */
939
+ folderPath(project, bucket, folder) {
940
+ return this.storageControlInternal.folderPath(project, bucket, folder);
941
+ }
942
+ /**
943
+ * Parse the project from Folder resource.
944
+ *
945
+ * @param {string} folderName
946
+ * A fully-qualified path representing Folder resource.
947
+ * @returns {string} A string representing the project.
948
+ */
949
+ matchProjectFromFolderName(folderName) {
950
+ return this.storageControlInternal.matchProjectFromFolderName(folderName);
951
+ }
952
+ /**
953
+ * Parse the bucket from Folder resource.
954
+ *
955
+ * @param {string} folderName
956
+ * A fully-qualified path representing Folder resource.
957
+ * @returns {string} A string representing the bucket.
958
+ */
959
+ matchBucketFromFolderName(folderName) {
960
+ return this.storageControlInternal.matchBucketFromFolderName(folderName);
961
+ }
962
+ /**
963
+ * Parse the folder from Folder resource.
964
+ *
965
+ * @param {string} folderName
966
+ * A fully-qualified path representing Folder resource.
967
+ * @returns {string} A string representing the folder.
968
+ */
969
+ matchFolderFromFolderName(folderName) {
970
+ return this.storageControlInternal.matchFolderFromFolderName(folderName);
971
+ }
972
+ /**
973
+ * Return a fully-qualified folderLocationIntelligenceConfig resource name string.
974
+ *
975
+ * @param {string} folder
976
+ * @param {string} location
977
+ * @returns {string} Resource name string.
978
+ */
979
+ folderLocationIntelligenceConfigPath(folder, location) {
980
+ return this.storageControlInternal.folderLocationIntelligenceConfigPath(folder, location);
981
+ }
982
+ /**
983
+ * Parse the folder from FolderLocationIntelligenceConfig resource.
984
+ *
985
+ * @param {string} folderLocationIntelligenceConfigName
986
+ * A fully-qualified path representing folder_location_intelligenceConfig resource.
987
+ * @returns {string} A string representing the folder.
988
+ */
989
+ matchFolderFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName) {
990
+ return this.storageControlInternal.matchFolderFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName);
991
+ }
992
+ /**
993
+ * Parse the location from FolderLocationIntelligenceConfig resource.
994
+ *
995
+ * @param {string} folderLocationIntelligenceConfigName
996
+ * A fully-qualified path representing folder_location_intelligenceConfig resource.
997
+ * @returns {string} A string representing the location.
998
+ */
999
+ matchLocationFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName) {
1000
+ return this.storageControlInternal.matchLocationFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName);
1001
+ }
1002
+ /**
1003
+ * Return a fully-qualified managedFolder resource name string.
1004
+ *
1005
+ * @param {string} project
1006
+ * @param {string} bucket
1007
+ * @param {string} managed_folder
1008
+ * @returns {string} Resource name string.
1009
+ */
1010
+ managedFolderPath(project, bucket, managedFolder) {
1011
+ return this.storageControlInternal.managedFolderPath(project, bucket, managedFolder);
1012
+ }
1013
+ /**
1014
+ * Parse the project from ManagedFolder resource.
1015
+ *
1016
+ * @param {string} managedFolderName
1017
+ * A fully-qualified path representing ManagedFolder resource.
1018
+ * @returns {string} A string representing the project.
1019
+ */
1020
+ matchProjectFromManagedFolderName(managedFolderName) {
1021
+ return this.storageControlInternal.matchProjectFromManagedFolderName(managedFolderName);
1022
+ }
1023
+ /**
1024
+ * Parse the bucket from ManagedFolder resource.
1025
+ *
1026
+ * @param {string} managedFolderName
1027
+ * A fully-qualified path representing ManagedFolder resource.
1028
+ * @returns {string} A string representing the bucket.
1029
+ */
1030
+ matchBucketFromManagedFolderName(managedFolderName) {
1031
+ return this.storageControlInternal.matchBucketFromManagedFolderName(managedFolderName);
1032
+ }
1033
+ /**
1034
+ * Parse the managed_folder from ManagedFolder resource.
1035
+ *
1036
+ * @param {string} managedFolderName
1037
+ * A fully-qualified path representing ManagedFolder resource.
1038
+ * @returns {string} A string representing the managed_folder.
1039
+ */
1040
+ matchManagedFolderFromManagedFolderName(managedFolderName) {
1041
+ return this.storageControlInternal.matchManagedFolderFromManagedFolderName(managedFolderName);
1042
+ }
1043
+ /**
1044
+ * Return a fully-qualified orgLocationIntelligenceConfig resource name string.
1045
+ *
1046
+ * @param {string} org
1047
+ * @param {string} location
1048
+ * @returns {string} Resource name string.
1049
+ */
1050
+ orgLocationIntelligenceConfigPath(org, location) {
1051
+ return this.storageControlInternal.orgLocationIntelligenceConfigPath(org, location);
1052
+ }
1053
+ /**
1054
+ * Parse the org from OrgLocationIntelligenceConfig resource.
1055
+ *
1056
+ * @param {string} orgLocationIntelligenceConfigName
1057
+ * A fully-qualified path representing org_location_intelligenceConfig resource.
1058
+ * @returns {string} A string representing the org.
1059
+ */
1060
+ matchOrgFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName) {
1061
+ return this.storageControlInternal.matchOrgFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName);
1062
+ }
1063
+ /**
1064
+ * Parse the location from OrgLocationIntelligenceConfig resource.
1065
+ *
1066
+ * @param {string} orgLocationIntelligenceConfigName
1067
+ * A fully-qualified path representing org_location_intelligenceConfig resource.
1068
+ * @returns {string} A string representing the location.
1069
+ */
1070
+ matchLocationFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName) {
1071
+ return this.storageControlInternal.matchLocationFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName);
1072
+ }
1073
+ /**
1074
+ * Return a fully-qualified project resource name string.
1075
+ *
1076
+ * @param {string} project
1077
+ * @returns {string} Resource name string.
1078
+ */
1079
+ projectPath(project) {
1080
+ return this.storageControlInternal.projectPath(project);
1081
+ }
1082
+ /**
1083
+ * Parse the project from Project resource.
1084
+ *
1085
+ * @param {string} projectName
1086
+ * A fully-qualified path representing Project resource.
1087
+ * @returns {string} A string representing the project.
1088
+ */
1089
+ matchProjectFromProjectName(projectName) {
1090
+ return this.storageControlInternal.matchProjectFromProjectName(projectName);
1091
+ }
1092
+ /**
1093
+ * Return a fully-qualified projectLocationIntelligenceConfig resource name string.
1094
+ *
1095
+ * @param {string} project
1096
+ * @param {string} location
1097
+ * @returns {string} Resource name string.
1098
+ */
1099
+ projectLocationIntelligenceConfigPath(project, location) {
1100
+ return this.storageControlInternal.projectLocationIntelligenceConfigPath(project, location);
1101
+ }
1102
+ /**
1103
+ * Parse the project from ProjectLocationIntelligenceConfig resource.
1104
+ *
1105
+ * @param {string} projectLocationIntelligenceConfigName
1106
+ * A fully-qualified path representing project_location_intelligenceConfig resource.
1107
+ * @returns {string} A string representing the project.
1108
+ */
1109
+ matchProjectFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName) {
1110
+ return this.storageControlInternal.matchProjectFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName);
1111
+ }
1112
+ /**
1113
+ * Parse the location from ProjectLocationIntelligenceConfig resource.
1114
+ *
1115
+ * @param {string} projectLocationIntelligenceConfigName
1116
+ * A fully-qualified path representing project_location_intelligenceConfig resource.
1117
+ * @returns {string} A string representing the location.
1118
+ */
1119
+ matchLocationFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName) {
1120
+ return this.storageControlInternal.matchLocationFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName);
1121
+ }
1122
+ /**
1123
+ * Return a fully-qualified storageLayout resource name string.
1124
+ *
1125
+ * @param {string} project
1126
+ * @param {string} bucket
1127
+ * @returns {string} Resource name string.
1128
+ */
1129
+ storageLayoutPath(project, bucket) {
1130
+ return this.storageControlInternal.storageLayoutPath(project, bucket);
1131
+ }
1132
+ /**
1133
+ * Parse the project from StorageLayout resource.
1134
+ *
1135
+ * @param {string} storageLayoutName
1136
+ * A fully-qualified path representing StorageLayout resource.
1137
+ * @returns {string} A string representing the project.
1138
+ */
1139
+ matchProjectFromStorageLayoutName(storageLayoutName) {
1140
+ return this.storageControlInternal.matchProjectFromStorageLayoutName(storageLayoutName);
1141
+ }
1142
+ /**
1143
+ * Parse the bucket from StorageLayout resource.
1144
+ *
1145
+ * @param {string} storageLayoutName
1146
+ * A fully-qualified path representing StorageLayout resource.
1147
+ * @returns {string} A string representing the bucket.
1148
+ */
1149
+ matchBucketFromStorageLayoutName(storageLayoutName) {
1150
+ return this.storageControlInternal.matchBucketFromStorageLayoutName(storageLayoutName);
1151
+ }
1152
+ /**
1153
+ * Terminate the gRPC channel and close the client.
1154
+ *
1155
+ * The client will no longer be usable and all future behavior is undefined.
1156
+ * @returns {Promise} A promise that resolves when the client is closed.
1157
+ */
1158
+ close() {
1159
+ return Promise.all([
1160
+ this.storageControlInternal.close(),
1161
+ this.storageClient.close(),
1162
+ ]).then(() => { });
1163
+ }
1164
+ deleteBucket(request, optionsOrCallback, callback) {
1165
+ request = request || {};
1166
+ let options;
1167
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1168
+ callback = optionsOrCallback;
1169
+ options = {};
1170
+ }
1171
+ else {
1172
+ options = optionsOrCallback;
1173
+ }
1174
+ if (callback === undefined) {
1175
+ return this.storageClient.deleteBucket(request, options);
1176
+ }
1177
+ return this.storageClient.deleteBucket(request, options, callback);
1178
+ }
1179
+ getBucket(request, optionsOrCallback, callback) {
1180
+ request = request || {};
1181
+ let options;
1182
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1183
+ callback = optionsOrCallback;
1184
+ options = {};
1185
+ }
1186
+ else {
1187
+ options = optionsOrCallback;
1188
+ }
1189
+ if (callback === undefined) {
1190
+ return this.storageClient.getBucket(request, options);
1191
+ }
1192
+ return this.storageClient.getBucket(request, options, callback);
1193
+ }
1194
+ createBucket(request, optionsOrCallback, callback) {
1195
+ request = request || {};
1196
+ let options;
1197
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1198
+ callback = optionsOrCallback;
1199
+ options = {};
1200
+ }
1201
+ else {
1202
+ options = optionsOrCallback;
1203
+ }
1204
+ if (callback === undefined) {
1205
+ return this.storageClient.createBucket(request, options);
1206
+ }
1207
+ return this.storageClient.createBucket(request, options, callback);
1208
+ }
1209
+ lockBucketRetentionPolicy(request, optionsOrCallback, callback) {
1210
+ request = request || {};
1211
+ let options;
1212
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1213
+ callback = optionsOrCallback;
1214
+ options = {};
1215
+ }
1216
+ else {
1217
+ options = optionsOrCallback;
1218
+ }
1219
+ if (callback === undefined) {
1220
+ return this.storageClient.lockBucketRetentionPolicy(request, options);
1221
+ }
1222
+ return this.storageClient.lockBucketRetentionPolicy(request, options, callback);
1223
+ }
1224
+ updateBucket(request, optionsOrCallback, callback) {
1225
+ request = request || {};
1226
+ let options;
1227
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1228
+ callback = optionsOrCallback;
1229
+ options = {};
1230
+ }
1231
+ else {
1232
+ options = optionsOrCallback;
1233
+ }
1234
+ if (callback === undefined) {
1235
+ return this.storageClient.updateBucket(request, options);
1236
+ }
1237
+ return this.storageClient.updateBucket(request, options, callback);
1238
+ }
1239
+ listBuckets(request, optionsOrCallback, callback) {
1240
+ request = request || {};
1241
+ let options;
1242
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1243
+ callback = optionsOrCallback;
1244
+ options = {};
1245
+ }
1246
+ else {
1247
+ options = optionsOrCallback;
1248
+ }
1249
+ if (callback === undefined) {
1250
+ return this.storageClient.listBuckets(request, options);
1251
+ }
1252
+ return this.storageClient.listBuckets(request, options, callback);
1253
+ }
1254
+ /**
1255
+ * Equivalent to `listBuckets`, but returns a NodeJS Stream object.
1256
+ * @param {Object} request
1257
+ * The request object that will be sent.
1258
+ * @param {string} request.parent
1259
+ * Required. The project whose buckets we are listing.
1260
+ * @param {number} [request.pageSize]
1261
+ * Optional. Maximum number of buckets to return in a single response. The
1262
+ * service uses this parameter or `1,000` items, whichever is smaller. If
1263
+ * `acl` is present in the `read_mask`, the service uses this parameter of
1264
+ * `200` items, whichever is smaller.
1265
+ * @param {string} [request.pageToken]
1266
+ * Optional. A previously-returned page token representing part of the larger
1267
+ * set of results to view.
1268
+ * @param {string} [request.prefix]
1269
+ * Optional. Filter results to buckets whose names begin with this prefix.
1270
+ * @param {google.protobuf.FieldMask} request.readMask
1271
+ * Mask specifying which fields to read from each result.
1272
+ * If no mask is specified, it defaults to all fields except `items.
1273
+ * owner`, `items.acl`, and `items.default_object_acl`.
1274
+ * `*` might be used to mean "all fields".
1275
+ * @param {boolean} [request.returnPartialSuccess]
1276
+ * Optional. Allows listing of buckets, even if there are buckets that are
1277
+ * unreachable.
1278
+ * @param {object} [options]
1279
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1280
+ * @returns {Stream}
1281
+ * An object stream which emits an object representing {@link protos.google.storage.v2.Bucket|Bucket} on 'data' event.
1282
+ * The client library will perform auto-pagination by default: it will call the API as many
1283
+ * times as needed. Note that it can affect your quota.
1284
+ * We recommend using `listBucketsAsync()`
1285
+ * method described below for async iteration which you can stop as needed.
1286
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1287
+ * for more details and examples.
1288
+ */
1289
+ listBucketsStream(request, options) {
1290
+ return this.storageClient.listBucketsStream(request, options);
1291
+ }
1292
+ /**
1293
+ * Equivalent to `listBuckets`, but returns an iterable object.
1294
+ *
1295
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1296
+ * @param {Object} request
1297
+ * The request object that will be sent.
1298
+ * @param {string} request.parent
1299
+ * Required. The project whose buckets we are listing.
1300
+ * @param {number} [request.pageSize]
1301
+ * Optional. Maximum number of buckets to return in a single response. The
1302
+ * service uses this parameter or `1,000` items, whichever is smaller. If
1303
+ * `acl` is present in the `read_mask`, the service uses this parameter of
1304
+ * `200` items, whichever is smaller.
1305
+ * @param {string} [request.pageToken]
1306
+ * Optional. A previously-returned page token representing part of the larger
1307
+ * set of results to view.
1308
+ * @param {string} [request.prefix]
1309
+ * Optional. Filter results to buckets whose names begin with this prefix.
1310
+ * @param {google.protobuf.FieldMask} request.readMask
1311
+ * Mask specifying which fields to read from each result.
1312
+ * If no mask is specified, it defaults to all fields except `items.
1313
+ * owner`, `items.acl`, and `items.default_object_acl`.
1314
+ * `*` might be used to mean "all fields".
1315
+ * @param {boolean} [request.returnPartialSuccess]
1316
+ * Optional. Allows listing of buckets, even if there are buckets that are
1317
+ * unreachable.
1318
+ * @param {object} [options]
1319
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1320
+ * @returns {Object}
1321
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1322
+ * When you iterate the returned iterable, each element will be an object representing
1323
+ * {@link protos.google.storage.v2.Bucket|Bucket}. The API will be called under the hood as needed, once per the page,
1324
+ * so you can stop the iteration when you don't need more results.
1325
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1326
+ * for more details and examples.
1327
+ * @example <caption>include:samples/generated/v2/storage.list_buckets.js</caption>
1328
+ * region_tag:storage_v2_generated_Storage_ListBuckets_async
1329
+ */
1330
+ listBucketsAsync(request, options) {
1331
+ return this.storageClient.listBucketsAsync(request, options);
1332
+ }
1333
+ /**
1334
+ * Return a fully-qualified cryptoKey resource name string.
1335
+ *
1336
+ * @param {string} project
1337
+ * @param {string} location
1338
+ * @param {string} key_ring
1339
+ * @param {string} crypto_key
1340
+ * @returns {string} Resource name string.
1341
+ */
1342
+ cryptoKeyPath(project, location, keyRing, cryptoKey) {
1343
+ return this.storageClient.cryptoKeyPath(project, location, keyRing, cryptoKey);
1344
+ }
1345
+ /**
1346
+ * Parse the project from CryptoKey resource.
1347
+ *
1348
+ * @param {string} cryptoKeyName
1349
+ * A fully-qualified path representing CryptoKey resource.
1350
+ * @returns {string} A string representing the project.
1351
+ */
1352
+ matchProjectFromCryptoKeyName(cryptoKeyName) {
1353
+ return this.storageClient.matchProjectFromCryptoKeyName(cryptoKeyName);
1354
+ }
1355
+ /**
1356
+ * Parse the location from CryptoKey resource.
1357
+ *
1358
+ * @param {string} cryptoKeyName
1359
+ * A fully-qualified path representing CryptoKey resource.
1360
+ * @returns {string} A string representing the location.
1361
+ */
1362
+ matchLocationFromCryptoKeyName(cryptoKeyName) {
1363
+ return this.storageClient.matchLocationFromCryptoKeyName(cryptoKeyName);
1364
+ }
1365
+ /**
1366
+ * Parse the key_ring from CryptoKey resource.
1367
+ *
1368
+ * @param {string} cryptoKeyName
1369
+ * A fully-qualified path representing CryptoKey resource.
1370
+ * @returns {string} A string representing the key_ring.
1371
+ */
1372
+ matchKeyRingFromCryptoKeyName(cryptoKeyName) {
1373
+ return this.storageClient.matchKeyRingFromCryptoKeyName(cryptoKeyName);
1374
+ }
1375
+ /**
1376
+ * Parse the crypto_key from CryptoKey resource.
1377
+ *
1378
+ * @param {string} cryptoKeyName
1379
+ * A fully-qualified path representing CryptoKey resource.
1380
+ * @returns {string} A string representing the crypto_key.
1381
+ */
1382
+ matchCryptoKeyFromCryptoKeyName(cryptoKeyName) {
1383
+ return this.storageClient.matchCryptoKeyFromCryptoKeyName(cryptoKeyName);
1384
+ }
1385
+ }
1386
+ exports.StorageControlClient = StorageControlClient;
1387
+ //# sourceMappingURL=storage_control_client.js.map