@google-cloud/storage-control 0.7.0 → 0.8.1

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.
@@ -119,6 +119,44 @@ class StorageControlClient {
119
119
  }
120
120
  return this.storageControlInternal.getProjectId();
121
121
  }
122
+ // -------------------
123
+ // -- Service calls --
124
+ // -------------------
125
+ /**
126
+ * Creates a new folder. This operation is only applicable to a hierarchical
127
+ * namespace enabled bucket.
128
+ *
129
+ * @param {Object} request
130
+ * The request object that will be sent.
131
+ * @param {string} request.parent
132
+ * Required. Name of the bucket in which the folder will reside. The bucket
133
+ * must be a hierarchical namespace enabled bucket.
134
+ * @param {google.storage.control.v2.Folder} request.folder
135
+ * Required. Properties of the new folder being created.
136
+ * The bucket and name of the folder are specified in the parent and folder_id
137
+ * fields, respectively. Populating those fields in `folder` will result in an
138
+ * error.
139
+ * @param {string} request.folderId
140
+ * Required. The full name of a folder, including all its parent folders.
141
+ * Folders use single '/' characters as a delimiter.
142
+ * The folder_id must end with a slash.
143
+ * For example, the folder_id of "books/biographies/" would create a new
144
+ * "biographies/" folder under the "books/" folder.
145
+ * @param {boolean} [request.recursive]
146
+ * Optional. If true, parent folder doesn't have to be present and all missing
147
+ * ancestor folders will be created atomically.
148
+ * @param {string} [request.requestId]
149
+ * Optional. A unique identifier for this request. UUID is the recommended
150
+ * format, but other formats are still accepted.
151
+ * @param {object} [options]
152
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
153
+ * @returns {Promise} - The promise which resolves to an array.
154
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
155
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
156
+ * for more details and examples.
157
+ * @example <caption>include:samples/generated/v2/storage_control.create_folder.js</caption>
158
+ * region_tag:storage_v2_generated_StorageControl_CreateFolder_async
159
+ */
122
160
  createFolder(request, optionsOrCallback, callback) {
123
161
  request = request || {};
124
162
  let options;
@@ -134,6 +172,33 @@ class StorageControlClient {
134
172
  }
135
173
  return this.storageControlInternal.createFolder(request, options, callback);
136
174
  }
175
+ /**
176
+ * Permanently deletes an empty folder. This operation is only applicable to a
177
+ * hierarchical namespace enabled bucket.
178
+ *
179
+ * @param {Object} request
180
+ * The request object that will be sent.
181
+ * @param {string} request.name
182
+ * Required. Name of the folder.
183
+ * Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
184
+ * @param {number} request.ifMetagenerationMatch
185
+ * Makes the operation only succeed conditional on whether the folder's
186
+ * current metageneration matches the given value.
187
+ * @param {number} request.ifMetagenerationNotMatch
188
+ * Makes the operation only succeed conditional on whether the folder's
189
+ * current metageneration does not match the given value.
190
+ * @param {string} [request.requestId]
191
+ * Optional. A unique identifier for this request. UUID is the recommended
192
+ * format, but other formats are still accepted.
193
+ * @param {object} [options]
194
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
195
+ * @returns {Promise} - The promise which resolves to an array.
196
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
197
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
198
+ * for more details and examples.
199
+ * @example <caption>include:samples/generated/v2/storage_control.delete_folder.js</caption>
200
+ * region_tag:storage_v2_generated_StorageControl_DeleteFolder_async
201
+ */
137
202
  deleteFolder(request, optionsOrCallback, callback) {
138
203
  request = request || {};
139
204
  let options;
@@ -149,6 +214,33 @@ class StorageControlClient {
149
214
  }
150
215
  return this.storageControlInternal.deleteFolder(request, options, callback);
151
216
  }
217
+ /**
218
+ * Returns metadata for the specified folder. This operation is only
219
+ * applicable to a hierarchical namespace enabled bucket.
220
+ *
221
+ * @param {Object} request
222
+ * The request object that will be sent.
223
+ * @param {string} request.name
224
+ * Required. Name of the folder.
225
+ * Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
226
+ * @param {number} request.ifMetagenerationMatch
227
+ * Makes the operation only succeed conditional on whether the folder's
228
+ * current metageneration matches the given value.
229
+ * @param {number} request.ifMetagenerationNotMatch
230
+ * Makes the operation only succeed conditional on whether the folder's
231
+ * current metageneration does not match the given value.
232
+ * @param {string} [request.requestId]
233
+ * Optional. A unique identifier for this request. UUID is the recommended
234
+ * format, but other formats are still accepted.
235
+ * @param {object} [options]
236
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
237
+ * @returns {Promise} - The promise which resolves to an array.
238
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
239
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
240
+ * for more details and examples.
241
+ * @example <caption>include:samples/generated/v2/storage_control.get_folder.js</caption>
242
+ * region_tag:storage_v2_generated_StorageControl_GetFolder_async
243
+ */
152
244
  getFolder(request, optionsOrCallback, callback) {
153
245
  request = request || {};
154
246
  let options;
@@ -164,6 +256,29 @@ class StorageControlClient {
164
256
  }
165
257
  return this.storageControlInternal.getFolder(request, options, callback);
166
258
  }
259
+ /**
260
+ * Returns the storage layout configuration for a given bucket.
261
+ *
262
+ * @param {Object} request
263
+ * The request object that will be sent.
264
+ * @param {string} request.name
265
+ * Required. The name of the StorageLayout resource.
266
+ * Format: `projects/{project}/buckets/{bucket}/storageLayout`
267
+ * @param {string} request.prefix
268
+ * An optional prefix used for permission check. It is useful when the caller
269
+ * only has limited permissions under a specific prefix.
270
+ * @param {string} [request.requestId]
271
+ * Optional. A unique identifier for this request. UUID is the recommended
272
+ * format, but other formats are still accepted.
273
+ * @param {object} [options]
274
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
275
+ * @returns {Promise} - The promise which resolves to an array.
276
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.StorageLayout|StorageLayout}.
277
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
278
+ * for more details and examples.
279
+ * @example <caption>include:samples/generated/v2/storage_control.get_storage_layout.js</caption>
280
+ * region_tag:storage_v2_generated_StorageControl_GetStorageLayout_async
281
+ */
167
282
  getStorageLayout(request, optionsOrCallback, callback) {
168
283
  request = request || {};
169
284
  let options;
@@ -179,6 +294,33 @@ class StorageControlClient {
179
294
  }
180
295
  return this.storageControlInternal.getStorageLayout(request, options, callback);
181
296
  }
297
+ /**
298
+ * Creates a new managed folder.
299
+ *
300
+ * @param {Object} request
301
+ * The request object that will be sent.
302
+ * @param {string} request.parent
303
+ * Required. Name of the bucket this managed folder belongs to.
304
+ * @param {google.storage.control.v2.ManagedFolder} request.managedFolder
305
+ * Required. Properties of the managed folder being created.
306
+ * The bucket and managed folder names are specified in the `parent` and
307
+ * `managed_folder_id` fields. Populating these fields in `managed_folder`
308
+ * will result in an error.
309
+ * @param {string} request.managedFolderId
310
+ * Required. The name of the managed folder. It uses a single `/` as delimiter
311
+ * and leading and trailing `/` are allowed.
312
+ * @param {string} [request.requestId]
313
+ * Optional. A unique identifier for this request. UUID is the recommended
314
+ * format, but other formats are still accepted.
315
+ * @param {object} [options]
316
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
317
+ * @returns {Promise} - The promise which resolves to an array.
318
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
319
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
320
+ * for more details and examples.
321
+ * @example <caption>include:samples/generated/v2/storage_control.create_managed_folder.js</caption>
322
+ * region_tag:storage_v2_generated_StorageControl_CreateManagedFolder_async
323
+ */
182
324
  createManagedFolder(request, optionsOrCallback, callback) {
183
325
  request = request || {};
184
326
  let options;
@@ -194,6 +336,38 @@ class StorageControlClient {
194
336
  }
195
337
  return this.storageControlInternal.createManagedFolder(request, options, callback);
196
338
  }
339
+ /**
340
+ * Permanently deletes an empty managed folder.
341
+ *
342
+ * @param {Object} request
343
+ * The request object that will be sent.
344
+ * @param {string} request.name
345
+ * Required. Name of the managed folder.
346
+ * Format:
347
+ * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
348
+ * @param {number} request.ifMetagenerationMatch
349
+ * The operation succeeds conditional on the managed folder's current
350
+ * metageneration matching the value here specified.
351
+ * @param {number} request.ifMetagenerationNotMatch
352
+ * The operation succeeds conditional on the managed folder's current
353
+ * metageneration NOT matching the value here specified.
354
+ * @param {boolean} request.allowNonEmpty
355
+ * Allows deletion of a managed folder even if it is not empty.
356
+ * A managed folder is empty if it manages no child managed folders or
357
+ * objects. Caller must have permission for
358
+ * storage.managedFolders.setIamPolicy.
359
+ * @param {string} [request.requestId]
360
+ * Optional. A unique identifier for this request. UUID is the recommended
361
+ * format, but other formats are still accepted.
362
+ * @param {object} [options]
363
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
364
+ * @returns {Promise} - The promise which resolves to an array.
365
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
366
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
367
+ * for more details and examples.
368
+ * @example <caption>include:samples/generated/v2/storage_control.delete_managed_folder.js</caption>
369
+ * region_tag:storage_v2_generated_StorageControl_DeleteManagedFolder_async
370
+ */
197
371
  deleteManagedFolder(request, optionsOrCallback, callback) {
198
372
  request = request || {};
199
373
  let options;
@@ -209,6 +383,33 @@ class StorageControlClient {
209
383
  }
210
384
  return this.storageControlInternal.deleteManagedFolder(request, options, callback);
211
385
  }
386
+ /**
387
+ * Returns metadata for the specified managed folder.
388
+ *
389
+ * @param {Object} request
390
+ * The request object that will be sent.
391
+ * @param {string} request.name
392
+ * Required. Name of the managed folder.
393
+ * Format:
394
+ * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
395
+ * @param {number} request.ifMetagenerationMatch
396
+ * The operation succeeds conditional on the managed folder's current
397
+ * metageneration matching the value here specified.
398
+ * @param {number} request.ifMetagenerationNotMatch
399
+ * The operation succeeds conditional on the managed folder's current
400
+ * metageneration NOT matching the value here specified.
401
+ * @param {string} [request.requestId]
402
+ * Optional. A unique identifier for this request. UUID is the recommended
403
+ * format, but other formats are still accepted.
404
+ * @param {object} [options]
405
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
406
+ * @returns {Promise} - The promise which resolves to an array.
407
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
408
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
409
+ * for more details and examples.
410
+ * @example <caption>include:samples/generated/v2/storage_control.get_managed_folder.js</caption>
411
+ * region_tag:storage_v2_generated_StorageControl_GetManagedFolder_async
412
+ */
212
413
  getManagedFolder(request, optionsOrCallback, callback) {
213
414
  request = request || {};
214
415
  let options;
@@ -224,6 +425,30 @@ class StorageControlClient {
224
425
  }
225
426
  return this.storageControlInternal.getManagedFolder(request, options, callback);
226
427
  }
428
+ /**
429
+ * Disables an Anywhere Cache instance. A disabled instance is read-only. The
430
+ * disablement could be revoked by calling ResumeAnywhereCache. The cache
431
+ * instance will be deleted automatically if it remains in the disabled state
432
+ * for at least one hour.
433
+ *
434
+ * @param {Object} request
435
+ * The request object that will be sent.
436
+ * @param {string} request.name
437
+ * Required. The name field in the request should be:
438
+ * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
439
+ * @param {string} [request.requestId]
440
+ * Optional. A unique identifier for this request. UUID is the recommended
441
+ * format, but other formats are still accepted. This request is only
442
+ * idempotent if a `request_id` is provided.
443
+ * @param {object} [options]
444
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
445
+ * @returns {Promise} - The promise which resolves to an array.
446
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
447
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
448
+ * for more details and examples.
449
+ * @example <caption>include:samples/generated/v2/storage_control.disable_anywhere_cache.js</caption>
450
+ * region_tag:storage_v2_generated_StorageControl_DisableAnywhereCache_async
451
+ */
227
452
  disableAnywhereCache(request, optionsOrCallback, callback) {
228
453
  request = request || {};
229
454
  let options;
@@ -239,6 +464,27 @@ class StorageControlClient {
239
464
  }
240
465
  return this.storageControlInternal.disableAnywhereCache(request, options, callback);
241
466
  }
467
+ /**
468
+ * Pauses an Anywhere Cache instance.
469
+ *
470
+ * @param {Object} request
471
+ * The request object that will be sent.
472
+ * @param {string} request.name
473
+ * Required. The name field in the request should be:
474
+ * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
475
+ * @param {string} [request.requestId]
476
+ * Optional. A unique identifier for this request. UUID is the recommended
477
+ * format, but other formats are still accepted. This request is only
478
+ * idempotent if a `request_id` is provided.
479
+ * @param {object} [options]
480
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
481
+ * @returns {Promise} - The promise which resolves to an array.
482
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
483
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
484
+ * for more details and examples.
485
+ * @example <caption>include:samples/generated/v2/storage_control.pause_anywhere_cache.js</caption>
486
+ * region_tag:storage_v2_generated_StorageControl_PauseAnywhereCache_async
487
+ */
242
488
  pauseAnywhereCache(request, optionsOrCallback, callback) {
243
489
  request = request || {};
244
490
  let options;
@@ -254,6 +500,27 @@ class StorageControlClient {
254
500
  }
255
501
  return this.storageControlInternal.pauseAnywhereCache(request, options, callback);
256
502
  }
503
+ /**
504
+ * Resumes a disabled or paused Anywhere Cache instance.
505
+ *
506
+ * @param {Object} request
507
+ * The request object that will be sent.
508
+ * @param {string} request.name
509
+ * Required. The name field in the request should be:
510
+ * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
511
+ * @param {string} [request.requestId]
512
+ * Optional. A unique identifier for this request. UUID is the recommended
513
+ * format, but other formats are still accepted. This request is only
514
+ * idempotent if a `request_id` is provided.
515
+ * @param {object} [options]
516
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
517
+ * @returns {Promise} - The promise which resolves to an array.
518
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
519
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
520
+ * for more details and examples.
521
+ * @example <caption>include:samples/generated/v2/storage_control.resume_anywhere_cache.js</caption>
522
+ * region_tag:storage_v2_generated_StorageControl_ResumeAnywhereCache_async
523
+ */
257
524
  resumeAnywhereCache(request, optionsOrCallback, callback) {
258
525
  request = request || {};
259
526
  let options;
@@ -269,6 +536,26 @@ class StorageControlClient {
269
536
  }
270
537
  return this.storageControlInternal.resumeAnywhereCache(request, options, callback);
271
538
  }
539
+ /**
540
+ * Gets an Anywhere Cache instance.
541
+ *
542
+ * @param {Object} request
543
+ * The request object that will be sent.
544
+ * @param {string} request.name
545
+ * Required. The name field in the request should be:
546
+ * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
547
+ * @param {string} [request.requestId]
548
+ * Optional. A unique identifier for this request. UUID is the recommended
549
+ * format, but other formats are still accepted.
550
+ * @param {object} [options]
551
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
552
+ * @returns {Promise} - The promise which resolves to an array.
553
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
554
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
555
+ * for more details and examples.
556
+ * @example <caption>include:samples/generated/v2/storage_control.get_anywhere_cache.js</caption>
557
+ * region_tag:storage_v2_generated_StorageControl_GetAnywhereCache_async
558
+ */
272
559
  getAnywhereCache(request, optionsOrCallback, callback) {
273
560
  request = request || {};
274
561
  let options;
@@ -284,6 +571,25 @@ class StorageControlClient {
284
571
  }
285
572
  return this.storageControlInternal.getAnywhereCache(request, options, callback);
286
573
  }
574
+ /**
575
+ * Returns the Project scoped singleton IntelligenceConfig resource.
576
+ *
577
+ * @param {Object} request
578
+ * The request object that will be sent.
579
+ * @param {string} request.name
580
+ * Required. The name of the `IntelligenceConfig` resource associated with
581
+ * your project.
582
+ *
583
+ * Format: `projects/{id}/locations/global/intelligenceConfig`
584
+ * @param {object} [options]
585
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
586
+ * @returns {Promise} - The promise which resolves to an array.
587
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
588
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
589
+ * for more details and examples.
590
+ * @example <caption>include:samples/generated/v2/storage_control.get_project_intelligence_config.js</caption>
591
+ * region_tag:storage_v2_generated_StorageControl_GetProjectIntelligenceConfig_async
592
+ */
287
593
  getProjectIntelligenceConfig(request, optionsOrCallback, callback) {
288
594
  request = request || {};
289
595
  let options;
@@ -299,6 +605,29 @@ class StorageControlClient {
299
605
  }
300
606
  return this.storageControlInternal.getProjectIntelligenceConfig(request, options, callback);
301
607
  }
608
+ /**
609
+ * Updates the Project scoped singleton IntelligenceConfig resource.
610
+ *
611
+ * @param {Object} request
612
+ * The request object that will be sent.
613
+ * @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
614
+ * Required. The `IntelligenceConfig` resource to be updated.
615
+ * @param {google.protobuf.FieldMask} request.updateMask
616
+ * Required. The `update_mask` that specifies the fields within the
617
+ * `IntelligenceConfig` resource that should be modified by this update. Only
618
+ * the listed fields are updated.
619
+ * @param {string} [request.requestId]
620
+ * Optional. The ID that uniquely identifies the request, preventing duplicate
621
+ * processing.
622
+ * @param {object} [options]
623
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
624
+ * @returns {Promise} - The promise which resolves to an array.
625
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
626
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
627
+ * for more details and examples.
628
+ * @example <caption>include:samples/generated/v2/storage_control.update_project_intelligence_config.js</caption>
629
+ * region_tag:storage_v2_generated_StorageControl_UpdateProjectIntelligenceConfig_async
630
+ */
302
631
  updateProjectIntelligenceConfig(request, optionsOrCallback, callback) {
303
632
  request = request || {};
304
633
  let options;
@@ -314,6 +643,25 @@ class StorageControlClient {
314
643
  }
315
644
  return this.storageControlInternal.updateProjectIntelligenceConfig(request, options, callback);
316
645
  }
646
+ /**
647
+ * Returns the Folder scoped singleton IntelligenceConfig resource.
648
+ *
649
+ * @param {Object} request
650
+ * The request object that will be sent.
651
+ * @param {string} request.name
652
+ * Required. The name of the `IntelligenceConfig` resource associated with
653
+ * your folder.
654
+ *
655
+ * Format: `folders/{id}/locations/global/intelligenceConfig`
656
+ * @param {object} [options]
657
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
658
+ * @returns {Promise} - The promise which resolves to an array.
659
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
660
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
661
+ * for more details and examples.
662
+ * @example <caption>include:samples/generated/v2/storage_control.get_folder_intelligence_config.js</caption>
663
+ * region_tag:storage_v2_generated_StorageControl_GetFolderIntelligenceConfig_async
664
+ */
317
665
  getFolderIntelligenceConfig(request, optionsOrCallback, callback) {
318
666
  request = request || {};
319
667
  let options;
@@ -329,6 +677,29 @@ class StorageControlClient {
329
677
  }
330
678
  return this.storageControlInternal.getFolderIntelligenceConfig(request, options, callback);
331
679
  }
680
+ /**
681
+ * Updates the Folder scoped singleton IntelligenceConfig resource.
682
+ *
683
+ * @param {Object} request
684
+ * The request object that will be sent.
685
+ * @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
686
+ * Required. The `IntelligenceConfig` resource to be updated.
687
+ * @param {google.protobuf.FieldMask} request.updateMask
688
+ * Required. The `update_mask` that specifies the fields within the
689
+ * `IntelligenceConfig` resource that should be modified by this update. Only
690
+ * the listed fields are updated.
691
+ * @param {string} [request.requestId]
692
+ * Optional. The ID that uniquely identifies the request, preventing duplicate
693
+ * processing.
694
+ * @param {object} [options]
695
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
696
+ * @returns {Promise} - The promise which resolves to an array.
697
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
698
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
699
+ * for more details and examples.
700
+ * @example <caption>include:samples/generated/v2/storage_control.update_folder_intelligence_config.js</caption>
701
+ * region_tag:storage_v2_generated_StorageControl_UpdateFolderIntelligenceConfig_async
702
+ */
332
703
  updateFolderIntelligenceConfig(request, optionsOrCallback, callback) {
333
704
  request = request || {};
334
705
  let options;
@@ -344,6 +715,25 @@ class StorageControlClient {
344
715
  }
345
716
  return this.storageControlInternal.updateFolderIntelligenceConfig(request, options, callback);
346
717
  }
718
+ /**
719
+ * Returns the Organization scoped singleton IntelligenceConfig resource.
720
+ *
721
+ * @param {Object} request
722
+ * The request object that will be sent.
723
+ * @param {string} request.name
724
+ * Required. The name of the `IntelligenceConfig` resource associated with
725
+ * your organization.
726
+ *
727
+ * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
728
+ * @param {object} [options]
729
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
730
+ * @returns {Promise} - The promise which resolves to an array.
731
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
732
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
733
+ * for more details and examples.
734
+ * @example <caption>include:samples/generated/v2/storage_control.get_organization_intelligence_config.js</caption>
735
+ * region_tag:storage_v2_generated_StorageControl_GetOrganizationIntelligenceConfig_async
736
+ */
347
737
  getOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
348
738
  request = request || {};
349
739
  let options;
@@ -359,6 +749,29 @@ class StorageControlClient {
359
749
  }
360
750
  return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options, callback);
361
751
  }
752
+ /**
753
+ * Updates the Organization scoped singleton IntelligenceConfig resource.
754
+ *
755
+ * @param {Object} request
756
+ * The request object that will be sent.
757
+ * @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
758
+ * Required. The `IntelligenceConfig` resource to be updated.
759
+ * @param {google.protobuf.FieldMask} request.updateMask
760
+ * Required. The `update_mask` that specifies the fields within the
761
+ * `IntelligenceConfig` resource that should be modified by this update. Only
762
+ * the listed fields are updated.
763
+ * @param {string} [request.requestId]
764
+ * Optional. The ID that uniquely identifies the request, preventing duplicate
765
+ * processing.
766
+ * @param {object} [options]
767
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
768
+ * @returns {Promise} - The promise which resolves to an array.
769
+ * The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
770
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
771
+ * for more details and examples.
772
+ * @example <caption>include:samples/generated/v2/storage_control.update_organization_intelligence_config.js</caption>
773
+ * region_tag:storage_v2_generated_StorageControl_UpdateOrganizationIntelligenceConfig_async
774
+ */
362
775
  updateOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
363
776
  request = request || {};
364
777
  let options;
@@ -374,6 +787,30 @@ class StorageControlClient {
374
787
  }
375
788
  return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options, callback);
376
789
  }
790
+ /**
791
+ * Gets the IAM policy for a specified bucket.
792
+ * The `resource` field in the request should be
793
+ * `projects/_/buckets/{bucket}` for a bucket, or
794
+ * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
795
+ * for a managed folder.
796
+ *
797
+ * @param {Object} request
798
+ * The request object that will be sent.
799
+ * @param {string} request.resource
800
+ * REQUIRED: The resource for which the policy is being requested.
801
+ * See the operation documentation for the appropriate value for this field.
802
+ * @param {google.iam.v1.GetPolicyOptions} request.options
803
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
804
+ * `GetIamPolicy`.
805
+ * @param {object} [options]
806
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
807
+ * @returns {Promise} - The promise which resolves to an array.
808
+ * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}.
809
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
810
+ * for more details and examples.
811
+ * @example <caption>include:samples/generated/v2/storage_control.get_iam_policy.js</caption>
812
+ * region_tag:storage_v2_generated_StorageControl_GetIamPolicy_async
813
+ */
377
814
  getIamPolicy(request, optionsOrCallback, callback) {
378
815
  request = request || {};
379
816
  let options;
@@ -389,6 +826,38 @@ class StorageControlClient {
389
826
  }
390
827
  return this.storageControlInternal.getIamPolicy(request, options, callback);
391
828
  }
829
+ /**
830
+ * Updates an IAM policy for the specified bucket.
831
+ * The `resource` field in the request should be
832
+ * `projects/_/buckets/{bucket}` for a bucket, or
833
+ * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
834
+ * for a managed folder.
835
+ *
836
+ * @param {Object} request
837
+ * The request object that will be sent.
838
+ * @param {string} request.resource
839
+ * REQUIRED: The resource for which the policy is being specified.
840
+ * See the operation documentation for the appropriate value for this field.
841
+ * @param {google.iam.v1.Policy} request.policy
842
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of
843
+ * the policy is limited to a few 10s of KB. An empty policy is a
844
+ * valid policy but certain Cloud Platform services (such as Projects)
845
+ * might reject them.
846
+ * @param {google.protobuf.FieldMask} request.updateMask
847
+ * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
848
+ * the fields in the mask will be modified. If no mask is provided, the
849
+ * following default mask is used:
850
+ *
851
+ * `paths: "bindings, etag"`
852
+ * @param {object} [options]
853
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
854
+ * @returns {Promise} - The promise which resolves to an array.
855
+ * The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}.
856
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
857
+ * for more details and examples.
858
+ * @example <caption>include:samples/generated/v2/storage_control.set_iam_policy.js</caption>
859
+ * region_tag:storage_v2_generated_StorageControl_SetIamPolicy_async
860
+ */
392
861
  setIamPolicy(request, optionsOrCallback, callback) {
393
862
  request = request || {};
394
863
  let options;
@@ -404,6 +873,34 @@ class StorageControlClient {
404
873
  }
405
874
  return this.storageControlInternal.setIamPolicy(request, options, callback);
406
875
  }
876
+ /**
877
+ * Tests a set of permissions on the given bucket, object, or managed folder
878
+ * to see which, if any, are held by the caller.
879
+ * The `resource` field in the request should be
880
+ * `projects/_/buckets/{bucket}` for a bucket,
881
+ * `projects/_/buckets/{bucket}/objects/{object}` for an object, or
882
+ * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
883
+ * for a managed folder.
884
+ *
885
+ * @param {Object} request
886
+ * The request object that will be sent.
887
+ * @param {string} request.resource
888
+ * REQUIRED: The resource for which the policy detail is being requested.
889
+ * See the operation documentation for the appropriate value for this field.
890
+ * @param {string[]} request.permissions
891
+ * The set of permissions to check for the `resource`. Permissions with
892
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
893
+ * information see
894
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
895
+ * @param {object} [options]
896
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
897
+ * @returns {Promise} - The promise which resolves to an array.
898
+ * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}.
899
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
900
+ * for more details and examples.
901
+ * @example <caption>include:samples/generated/v2/storage_control.test_iam_permissions.js</caption>
902
+ * region_tag:storage_v2_generated_StorageControl_TestIamPermissions_async
903
+ */
407
904
  testIamPermissions(request, optionsOrCallback, callback) {
408
905
  request = request || {};
409
906
  let options;
@@ -419,6 +916,40 @@ class StorageControlClient {
419
916
  }
420
917
  return this.storageControlInternal.testIamPermissions(request, options, callback);
421
918
  }
919
+ /**
920
+ * Renames a source folder to a destination folder. This operation is only
921
+ * applicable to a hierarchical namespace enabled bucket. During a rename, the
922
+ * source and destination folders are locked until the long running operation
923
+ * completes.
924
+ *
925
+ * @param {Object} request
926
+ * The request object that will be sent.
927
+ * @param {string} request.name
928
+ * Required. Name of the source folder being renamed.
929
+ * Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
930
+ * @param {string} request.destinationFolderId
931
+ * Required. The destination folder ID, e.g. `foo/bar/`.
932
+ * @param {number} request.ifMetagenerationMatch
933
+ * Makes the operation only succeed conditional on whether the source
934
+ * folder's current metageneration matches the given value.
935
+ * @param {number} request.ifMetagenerationNotMatch
936
+ * Makes the operation only succeed conditional on whether the source
937
+ * folder's current metageneration does not match the given value.
938
+ * @param {string} [request.requestId]
939
+ * Optional. A unique identifier for this request. UUID is the recommended
940
+ * format, but other formats are still accepted. This request is only
941
+ * idempotent if a `request_id` is provided.
942
+ * @param {object} [options]
943
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
944
+ * @returns {Promise} - The promise which resolves to an array.
945
+ * The first element of the array is an object representing
946
+ * a long running operation. Its `promise()` method returns a promise
947
+ * you can `await` for.
948
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
949
+ * for more details and examples.
950
+ * @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
951
+ * region_tag:storage_v2_generated_StorageControl_RenameFolder_async
952
+ */
422
953
  renameFolder(request, optionsOrCallback, callback) {
423
954
  request = request || {};
424
955
  let options;
@@ -448,6 +979,93 @@ class StorageControlClient {
448
979
  checkRenameFolderProgress(name) {
449
980
  return this.storageControlInternal.checkRenameFolderProgress(name);
450
981
  }
982
+ /**
983
+ * Deletes a folder recursively. This operation is only applicable to a
984
+ * hierarchical namespace enabled bucket.
985
+ *
986
+ * @param {Object} request
987
+ * The request object that will be sent.
988
+ * @param {string} request.name
989
+ * Required. Name of the folder being deleted, however all of its contents
990
+ * will be deleted too. Format:
991
+ * `projects/{project}/buckets/{bucket}/folders/{folder}`
992
+ * @param {number} [request.ifMetagenerationMatch]
993
+ * Optional. Makes the operation only succeed conditional on whether the root
994
+ * folder's current metageneration matches the given value.
995
+ * @param {number} [request.ifMetagenerationNotMatch]
996
+ * Optional. Makes the operation only succeed conditional on whether the root
997
+ * folder's current metageneration does not match the given value.
998
+ * @param {string} [request.requestId]
999
+ * Optional. A unique identifier for this request. UUID is the recommended
1000
+ * format, but other formats are still accepted.
1001
+ * @param {object} [options]
1002
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1003
+ * @returns {Promise} - The promise which resolves to an array.
1004
+ * The first element of the array is an object representing
1005
+ * a long running operation. Its `promise()` method returns a promise
1006
+ * you can `await` for.
1007
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
1008
+ * for more details and examples.
1009
+ * @example <caption>include:samples/generated/v2/storage_control.delete_folder_recursive.js</caption>
1010
+ * region_tag:storage_v2_generated_StorageControl_DeleteFolderRecursive_async
1011
+ */
1012
+ deleteFolderRecursive(request, optionsOrCallback, callback) {
1013
+ request = request || {};
1014
+ let options;
1015
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1016
+ callback = optionsOrCallback;
1017
+ options = {};
1018
+ }
1019
+ else {
1020
+ options = optionsOrCallback;
1021
+ }
1022
+ if (callback === undefined) {
1023
+ return this.storageControlInternal.deleteFolderRecursive(request, options);
1024
+ }
1025
+ return this.storageControlInternal.deleteFolderRecursive(request, options, callback);
1026
+ }
1027
+ /**
1028
+ * Check the status of the long running operation returned by `deleteFolderRecursive()`.
1029
+ * @param {String} name
1030
+ * The operation name that will be passed.
1031
+ * @returns {Promise} - The promise which resolves to an object.
1032
+ * The decoded operation object has result and metadata field to get information from.
1033
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
1034
+ * for more details and examples.
1035
+ * @example <caption>include:samples/generated/v2/storage_control.delete_folder_recursive.js</caption>
1036
+ * region_tag:storage_v2_generated_StorageControl_DeleteFolderRecursive_async
1037
+ */
1038
+ checkDeleteFolderRecursiveProgress(name) {
1039
+ return this.storageControlInternal.checkDeleteFolderRecursiveProgress(name);
1040
+ }
1041
+ /**
1042
+ * Creates an Anywhere Cache instance.
1043
+ *
1044
+ * @param {Object} request
1045
+ * The request object that will be sent.
1046
+ * @param {string} request.parent
1047
+ * Required. The bucket to which this cache belongs.
1048
+ * Format: `projects/{project}/buckets/{bucket}`
1049
+ * @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
1050
+ * Required. Properties of the Anywhere Cache instance being created.
1051
+ * The parent bucket name is specified in the `parent` field. Server uses the
1052
+ * default value of `ttl` or `admission_policy` if not specified in
1053
+ * request.
1054
+ * @param {string} [request.requestId]
1055
+ * Optional. A unique identifier for this request. UUID is the recommended
1056
+ * format, but other formats are still accepted. This request is only
1057
+ * idempotent if a `request_id` is provided.
1058
+ * @param {object} [options]
1059
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1060
+ * @returns {Promise} - The promise which resolves to an array.
1061
+ * The first element of the array is an object representing
1062
+ * a long running operation. Its `promise()` method returns a promise
1063
+ * you can `await` for.
1064
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
1065
+ * for more details and examples.
1066
+ * @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
1067
+ * region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
1068
+ */
451
1069
  createAnywhereCache(request, optionsOrCallback, callback) {
452
1070
  request = request || {};
453
1071
  let options;
@@ -477,6 +1095,39 @@ class StorageControlClient {
477
1095
  checkCreateAnywhereCacheProgress(name) {
478
1096
  return this.storageControlInternal.checkCreateAnywhereCacheProgress(name);
479
1097
  }
1098
+ /**
1099
+ * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
1100
+ * `admission_policy`.
1101
+ *
1102
+ * @param {Object} request
1103
+ * The request object that will be sent.
1104
+ * @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
1105
+ * Required. The Anywhere Cache instance to be updated.
1106
+ * @param {google.protobuf.FieldMask} request.updateMask
1107
+ * Required. List of fields to be updated. Mutable fields of AnywhereCache
1108
+ * include `ttl` and `admission_policy`.
1109
+ *
1110
+ * To specify ALL fields, specify a single field with the value `*`. Note: We
1111
+ * recommend against doing this. If a new field is introduced at a later time,
1112
+ * an older client updating with the `*` may accidentally reset the new
1113
+ * field's value.
1114
+ *
1115
+ * Not specifying any fields is an error.
1116
+ * @param {string} [request.requestId]
1117
+ * Optional. A unique identifier for this request. UUID is the recommended
1118
+ * format, but other formats are still accepted. This request is only
1119
+ * idempotent if a `request_id` is provided.
1120
+ * @param {object} [options]
1121
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1122
+ * @returns {Promise} - The promise which resolves to an array.
1123
+ * The first element of the array is an object representing
1124
+ * a long running operation. Its `promise()` method returns a promise
1125
+ * you can `await` for.
1126
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
1127
+ * for more details and examples.
1128
+ * @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
1129
+ * region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
1130
+ */
480
1131
  updateAnywhereCache(request, optionsOrCallback, callback) {
481
1132
  request = request || {};
482
1133
  let options;
@@ -506,6 +1157,53 @@ class StorageControlClient {
506
1157
  checkUpdateAnywhereCacheProgress(name) {
507
1158
  return this.storageControlInternal.checkUpdateAnywhereCacheProgress(name);
508
1159
  }
1160
+ /**
1161
+ * Retrieves a list of folders. This operation is only applicable to a
1162
+ * hierarchical namespace enabled bucket.
1163
+ *
1164
+ * @param {Object} request
1165
+ * The request object that will be sent.
1166
+ * @param {string} request.parent
1167
+ * Required. Name of the bucket in which to look for folders. The bucket must
1168
+ * be a hierarchical namespace enabled bucket.
1169
+ * @param {number} [request.pageSize]
1170
+ * Optional. Maximum number of folders to return in a single response. The
1171
+ * service will use this parameter or 1,000 items, whichever is smaller.
1172
+ * @param {string} [request.pageToken]
1173
+ * Optional. A previously-returned page token representing part of the larger
1174
+ * set of results to view.
1175
+ * @param {string} [request.prefix]
1176
+ * Optional. Filter results to folders whose names begin with this prefix.
1177
+ * If set, the value must either be an empty string or end with a '/'.
1178
+ * @param {string} [request.delimiter]
1179
+ * Optional. If set, returns results in a directory-like mode. The results
1180
+ * will only include folders that either exactly match the above prefix, or
1181
+ * are one level below the prefix. The only supported value is '/'.
1182
+ * @param {string} [request.lexicographicStart]
1183
+ * Optional. Filter results to folders whose names are lexicographically equal
1184
+ * to or after lexicographic_start. If lexicographic_end is also set, the
1185
+ * folders listed have names between lexicographic_start (inclusive) and
1186
+ * lexicographic_end (exclusive).
1187
+ * @param {string} [request.lexicographicEnd]
1188
+ * Optional. Filter results to folders whose names are lexicographically
1189
+ * before lexicographic_end. If lexicographic_start is also set, the folders
1190
+ * listed have names between lexicographic_start (inclusive) and
1191
+ * lexicographic_end (exclusive).
1192
+ * @param {string} [request.requestId]
1193
+ * Optional. A unique identifier for this request. UUID is the recommended
1194
+ * format, but other formats are still accepted.
1195
+ * @param {object} [options]
1196
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1197
+ * @returns {Promise} - The promise which resolves to an array.
1198
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.Folder|Folder}.
1199
+ * The client library will perform auto-pagination by default: it will call the API as many
1200
+ * times as needed and will merge results from all the pages into this array.
1201
+ * Note that it can affect your quota.
1202
+ * We recommend using `listFoldersAsync()`
1203
+ * method described below for async iteration which you can stop as needed.
1204
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1205
+ * for more details and examples.
1206
+ */
509
1207
  listFolders(request, optionsOrCallback, callback) {
510
1208
  request = request || {};
511
1209
  let options;
@@ -618,6 +1316,37 @@ class StorageControlClient {
618
1316
  listFoldersAsync(request, options) {
619
1317
  return this.storageControlInternal.listFoldersAsync(request, options);
620
1318
  }
1319
+ /**
1320
+ * Retrieves a list of managed folders for a given bucket.
1321
+ *
1322
+ * @param {Object} request
1323
+ * The request object that will be sent.
1324
+ * @param {string} request.parent
1325
+ * Required. Name of the bucket this managed folder belongs to.
1326
+ * @param {number} [request.pageSize]
1327
+ * Optional. Maximum number of managed folders to return in a single response.
1328
+ * The service will use this parameter or 1,000 items, whichever is smaller.
1329
+ * @param {string} [request.pageToken]
1330
+ * Optional. A previously-returned page token representing part of the larger
1331
+ * set of results to view.
1332
+ * @param {string} [request.prefix]
1333
+ * Optional. Filter results to match managed folders with name starting with
1334
+ * this prefix.
1335
+ * @param {string} [request.requestId]
1336
+ * Optional. A unique identifier for this request. UUID is the recommended
1337
+ * format, but other formats are still accepted.
1338
+ * @param {object} [options]
1339
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1340
+ * @returns {Promise} - The promise which resolves to an array.
1341
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
1342
+ * The client library will perform auto-pagination by default: it will call the API as many
1343
+ * times as needed and will merge results from all the pages into this array.
1344
+ * Note that it can affect your quota.
1345
+ * We recommend using `listManagedFoldersAsync()`
1346
+ * method described below for async iteration which you can stop as needed.
1347
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1348
+ * for more details and examples.
1349
+ */
621
1350
  listManagedFolders(request, optionsOrCallback, callback) {
622
1351
  request = request || {};
623
1352
  let options;
@@ -700,6 +1429,34 @@ class StorageControlClient {
700
1429
  listManagedFoldersAsync(request, options) {
701
1430
  return this.storageControlInternal.listManagedFoldersAsync(request, options);
702
1431
  }
1432
+ /**
1433
+ * Lists Anywhere Cache instances for a given bucket.
1434
+ *
1435
+ * @param {Object} request
1436
+ * The request object that will be sent.
1437
+ * @param {string} request.parent
1438
+ * Required. The bucket to which this cache belongs.
1439
+ * @param {number} request.pageSize
1440
+ * Maximum number of caches to return in a single response.
1441
+ * The service will use this parameter or 1,000 items, whichever is smaller.
1442
+ * @param {string} request.pageToken
1443
+ * A previously-returned page token representing part of the larger set of
1444
+ * results to view.
1445
+ * @param {string} [request.requestId]
1446
+ * Optional. A unique identifier for this request. UUID is the recommended
1447
+ * format, but other formats are still accepted.
1448
+ * @param {object} [options]
1449
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1450
+ * @returns {Promise} - The promise which resolves to an array.
1451
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
1452
+ * The client library will perform auto-pagination by default: it will call the API as many
1453
+ * times as needed and will merge results from all the pages into this array.
1454
+ * Note that it can affect your quota.
1455
+ * We recommend using `listAnywhereCachesAsync()`
1456
+ * method described below for async iteration which you can stop as needed.
1457
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1458
+ * for more details and examples.
1459
+ */
703
1460
  listAnywhereCaches(request, optionsOrCallback, callback) {
704
1461
  request = request || {};
705
1462
  let options;
@@ -776,6 +1533,36 @@ class StorageControlClient {
776
1533
  listAnywhereCachesAsync(request, options) {
777
1534
  return this.storageControlInternal.listAnywhereCachesAsync(request, options);
778
1535
  }
1536
+ /**
1537
+ * Gets the latest state of a long-running operation. Clients can use this
1538
+ * method to poll the operation result at intervals as recommended by the API
1539
+ * service.
1540
+ *
1541
+ * @param {Object} request - The request object that will be sent.
1542
+ * @param {string} request.name - The name of the operation resource.
1543
+ * @param {Object=} options
1544
+ * Optional parameters. You can override the default settings for this call,
1545
+ * e.g, timeout, retries, paginations, etc. See {@link
1546
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1547
+ * for the details.
1548
+ * @param {function(?Error, ?Object)=} callback
1549
+ * The function which will be called with the result of the API call.
1550
+ *
1551
+ * The second parameter to the callback is an object representing
1552
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1553
+ * @return {Promise} - The promise which resolves to an array.
1554
+ * The first element of the array is an object representing
1555
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1556
+ * The promise has a method named "cancel" which cancels the ongoing API call.
1557
+ *
1558
+ * @example
1559
+ * ```
1560
+ * const client = longrunning.operationsClient();
1561
+ * const name = '';
1562
+ * const [response] = await client.getOperation({name});
1563
+ * // doThingsWith(response)
1564
+ * ```
1565
+ */
779
1566
  getOperation(request, optionsOrCallback, callback) {
780
1567
  request = request || {};
781
1568
  let options;
@@ -824,6 +1611,37 @@ class StorageControlClient {
824
1611
  listOperationsAsync(request, options) {
825
1612
  return this.storageControlInternal.listOperationsAsync(request, options);
826
1613
  }
1614
+ /**
1615
+ * Starts asynchronous cancellation on a long-running operation. The server
1616
+ * makes a best effort to cancel the operation, but success is not
1617
+ * guaranteed. If the server doesn't support this method, it returns
1618
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
1619
+ * {@link Operations.GetOperation} or
1620
+ * other methods to check whether the cancellation succeeded or whether the
1621
+ * operation completed despite cancellation. On successful cancellation,
1622
+ * the operation is not deleted; instead, it becomes an operation with
1623
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
1624
+ * 1, corresponding to `Code.CANCELLED`.
1625
+ *
1626
+ * @param {Object} request - The request object that will be sent.
1627
+ * @param {string} request.name - The name of the operation resource to be cancelled.
1628
+ * @param {Object=} options
1629
+ * Optional parameters. You can override the default settings for this call,
1630
+ * e.g, timeout, retries, paginations, etc. See {@link
1631
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
1632
+ * details.
1633
+ * @param {function(?Error)=} callback
1634
+ * The function which will be called with the result of the API call.
1635
+ * @return {Promise} - The promise which resolves when API call finishes.
1636
+ * The promise has a method named "cancel" which cancels the ongoing API
1637
+ * call.
1638
+ *
1639
+ * @example
1640
+ * ```
1641
+ * const client = longrunning.operationsClient();
1642
+ * await client.cancelOperation({name: ''});
1643
+ * ```
1644
+ */
827
1645
  cancelOperation(request, optionsOrCallback, callback) {
828
1646
  request = request || {};
829
1647
  let options;
@@ -839,6 +1657,31 @@ class StorageControlClient {
839
1657
  }
840
1658
  return this.storageControlInternal.cancelOperation(request, options, callback);
841
1659
  }
1660
+ /**
1661
+ * Deletes a long-running operation. This method indicates that the client is
1662
+ * no longer interested in the operation result. It does not cancel the
1663
+ * operation. If the server doesn't support this method, it returns
1664
+ * `google.rpc.Code.UNIMPLEMENTED`.
1665
+ *
1666
+ * @param {Object} request - The request object that will be sent.
1667
+ * @param {string} request.name - The name of the operation resource to be deleted.
1668
+ * @param {Object=} options
1669
+ * Optional parameters. You can override the default settings for this call,
1670
+ * e.g, timeout, retries, paginations, etc. See {@link
1671
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1672
+ * for the details.
1673
+ * @param {function(?Error)=} callback
1674
+ * The function which will be called with the result of the API call.
1675
+ * @return {Promise} - The promise which resolves when API call finishes.
1676
+ * The promise has a method named "cancel" which cancels the ongoing API
1677
+ * call.
1678
+ *
1679
+ * @example
1680
+ * ```
1681
+ * const client = longrunning.operationsClient();
1682
+ * await client.deleteOperation({name: ''});
1683
+ * ```
1684
+ */
842
1685
  deleteOperation(request, optionsOrCallback, callback) {
843
1686
  request = request || {};
844
1687
  let options;
@@ -1161,6 +2004,53 @@ class StorageControlClient {
1161
2004
  this.storageClient.close(),
1162
2005
  ]).then(() => { });
1163
2006
  }
2007
+ // -------------------
2008
+ // -- Service calls --
2009
+ // -------------------
2010
+ /**
2011
+ * Permanently deletes an empty bucket.
2012
+ * The request fails if there are any live or
2013
+ * noncurrent objects in the bucket, but the request succeeds if the
2014
+ * bucket only contains soft-deleted objects or incomplete uploads, such
2015
+ * as ongoing XML API multipart uploads. Does not permanently delete
2016
+ * soft-deleted objects.
2017
+ *
2018
+ * When this API is used to delete a bucket containing an object that has a
2019
+ * soft delete policy
2020
+ * enabled, the object becomes soft deleted, and the
2021
+ * `softDeleteTime` and `hardDeleteTime` properties are set on the
2022
+ * object.
2023
+ *
2024
+ * Objects and multipart uploads that were in the bucket at the time of
2025
+ * deletion are also retained for the specified retention duration. When
2026
+ * a soft-deleted bucket reaches the end of its retention duration, it
2027
+ * is permanently deleted. The `hardDeleteTime` of the bucket always
2028
+ * equals
2029
+ * or exceeds the expiration time of the last soft-deleted object in the
2030
+ * bucket.
2031
+ *
2032
+ * **IAM Permissions**:
2033
+ *
2034
+ * Requires `storage.buckets.delete` IAM permission on the bucket.
2035
+ *
2036
+ * @param {Object} request
2037
+ * The request object that will be sent.
2038
+ * @param {string} request.name
2039
+ * Required. Name of a bucket to delete.
2040
+ * @param {number} request.ifMetagenerationMatch
2041
+ * If set, only deletes the bucket if its metageneration matches this value.
2042
+ * @param {number} request.ifMetagenerationNotMatch
2043
+ * If set, only deletes the bucket if its metageneration does not match this
2044
+ * value.
2045
+ * @param {object} [options]
2046
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2047
+ * @returns {Promise} - The promise which resolves to an array.
2048
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
2049
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2050
+ * for more details and examples.
2051
+ * @example <caption>include:samples/generated/v2/storage.delete_bucket.js</caption>
2052
+ * region_tag:storage_v2_generated_Storage_DeleteBucket_async
2053
+ */
1164
2054
  deleteBucket(request, optionsOrCallback, callback) {
1165
2055
  request = request || {};
1166
2056
  let options;
@@ -1176,6 +2066,42 @@ class StorageControlClient {
1176
2066
  }
1177
2067
  return this.storageClient.deleteBucket(request, options, callback);
1178
2068
  }
2069
+ /**
2070
+ * Returns metadata for the specified bucket.
2071
+ *
2072
+ * **IAM Permissions**:
2073
+ *
2074
+ * Requires `storage.buckets.get`
2075
+ * IAM permission on
2076
+ * the bucket. Additionally, to return specific bucket metadata, the
2077
+ * authenticated user must have the following permissions:
2078
+ *
2079
+ * - To return the IAM policies: `storage.buckets.getIamPolicy`
2080
+ * - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
2081
+ *
2082
+ * @param {Object} request
2083
+ * The request object that will be sent.
2084
+ * @param {string} request.name
2085
+ * Required. Name of a bucket.
2086
+ * @param {number} request.ifMetagenerationMatch
2087
+ * If set, only gets the bucket metadata if its metageneration matches this
2088
+ * value.
2089
+ * @param {number} request.ifMetagenerationNotMatch
2090
+ * If set, and if the bucket's current metageneration matches the specified
2091
+ * value, the request returns an error.
2092
+ * @param {google.protobuf.FieldMask} request.readMask
2093
+ * Mask specifying which fields to read.
2094
+ * A `*` field might be used to indicate all fields.
2095
+ * If no mask is specified, it defaults to all fields.
2096
+ * @param {object} [options]
2097
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2098
+ * @returns {Promise} - The promise which resolves to an array.
2099
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2100
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2101
+ * for more details and examples.
2102
+ * @example <caption>include:samples/generated/v2/storage.get_bucket.js</caption>
2103
+ * region_tag:storage_v2_generated_Storage_GetBucket_async
2104
+ */
1179
2105
  getBucket(request, optionsOrCallback, callback) {
1180
2106
  request = request || {};
1181
2107
  let options;
@@ -1191,6 +2117,56 @@ class StorageControlClient {
1191
2117
  }
1192
2118
  return this.storageClient.getBucket(request, options, callback);
1193
2119
  }
2120
+ /**
2121
+ * Creates a new bucket.
2122
+ *
2123
+ * **IAM Permissions**:
2124
+ *
2125
+ * Requires `storage.buckets.create` IAM permission on the bucket.
2126
+ * Additionally, to enable specific bucket features, the authenticated user
2127
+ * must have the following permissions:
2128
+ *
2129
+ * - To enable object retention using the `enableObjectRetention` query
2130
+ * parameter: `storage.buckets.enableObjectRetention`
2131
+ * - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
2132
+ *
2133
+ * @param {Object} request
2134
+ * The request object that will be sent.
2135
+ * @param {string} request.parent
2136
+ * Required. The project to which this bucket belongs. This field must either
2137
+ * be empty or `projects/_`. The project ID that owns this bucket should be
2138
+ * specified in the `bucket.project` field.
2139
+ * @param {google.storage.v2.Bucket} [request.bucket]
2140
+ * Optional. Properties of the new bucket being inserted.
2141
+ * The name of the bucket is specified in the `bucket_id` field. Populating
2142
+ * `bucket.name` field results in an error.
2143
+ * The project of the bucket must be specified in the `bucket.project` field.
2144
+ * This field must be in `projects/{projectIdentifier}` format,
2145
+ * {projectIdentifier} can be the project ID or project number. The `parent`
2146
+ * field must be either empty or `projects/_`.
2147
+ * @param {string} request.bucketId
2148
+ * Required. The ID to use for this bucket, which becomes the final component
2149
+ * of the bucket's resource name. For example, the value `foo` might result in
2150
+ * a bucket with the name `projects/123456/buckets/foo`.
2151
+ * @param {string} [request.predefinedAcl]
2152
+ * Optional. Apply a predefined set of access controls to this bucket.
2153
+ * Valid values are `authenticatedRead`, `private`, `projectPrivate`,
2154
+ * `publicRead`, or `publicReadWrite`.
2155
+ * @param {string} [request.predefinedDefaultObjectAcl]
2156
+ * Optional. Apply a predefined set of default object access controls to this
2157
+ * bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
2158
+ * `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
2159
+ * @param {boolean} [request.enableObjectRetention]
2160
+ * Optional. If true, enable object retention on the bucket.
2161
+ * @param {object} [options]
2162
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2163
+ * @returns {Promise} - The promise which resolves to an array.
2164
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2165
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2166
+ * for more details and examples.
2167
+ * @example <caption>include:samples/generated/v2/storage.create_bucket.js</caption>
2168
+ * region_tag:storage_v2_generated_Storage_CreateBucket_async
2169
+ */
1194
2170
  createBucket(request, optionsOrCallback, callback) {
1195
2171
  request = request || {};
1196
2172
  let options;
@@ -1206,6 +2182,43 @@ class StorageControlClient {
1206
2182
  }
1207
2183
  return this.storageClient.createBucket(request, options, callback);
1208
2184
  }
2185
+ /**
2186
+ * Permanently locks the retention
2187
+ * policy that is
2188
+ * currently applied to the specified bucket.
2189
+ *
2190
+ * Caution: Locking a bucket is an
2191
+ * irreversible action. Once you lock a bucket:
2192
+ *
2193
+ * - You cannot remove the retention policy from the bucket.
2194
+ * - You cannot decrease the retention period for the policy.
2195
+ *
2196
+ * Once locked, you must delete the entire bucket in order to remove the
2197
+ * bucket's retention policy. However, before you can delete the bucket, you
2198
+ * must delete all the objects in the bucket, which is only
2199
+ * possible if all the objects have reached the retention period set by the
2200
+ * retention policy.
2201
+ *
2202
+ * **IAM Permissions**:
2203
+ *
2204
+ * Requires `storage.buckets.update` IAM permission on the bucket.
2205
+ *
2206
+ * @param {Object} request
2207
+ * The request object that will be sent.
2208
+ * @param {string} request.bucket
2209
+ * Required. Name of a bucket.
2210
+ * @param {number} request.ifMetagenerationMatch
2211
+ * Required. Makes the operation conditional on whether bucket's current
2212
+ * metageneration matches the given value. Must be positive.
2213
+ * @param {object} [options]
2214
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2215
+ * @returns {Promise} - The promise which resolves to an array.
2216
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2217
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2218
+ * for more details and examples.
2219
+ * @example <caption>include:samples/generated/v2/storage.lock_bucket_retention_policy.js</caption>
2220
+ * region_tag:storage_v2_generated_Storage_LockBucketRetentionPolicy_async
2221
+ */
1209
2222
  lockBucketRetentionPolicy(request, optionsOrCallback, callback) {
1210
2223
  request = request || {};
1211
2224
  let options;
@@ -1221,6 +2234,58 @@ class StorageControlClient {
1221
2234
  }
1222
2235
  return this.storageClient.lockBucketRetentionPolicy(request, options, callback);
1223
2236
  }
2237
+ /**
2238
+ * Updates a bucket. Changes to the bucket are readable immediately after
2239
+ * writing, but configuration changes might take time to propagate. This
2240
+ * method supports `patch` semantics.
2241
+ *
2242
+ * **IAM Permissions**:
2243
+ *
2244
+ * Requires `storage.buckets.update` IAM permission on the bucket.
2245
+ * Additionally, to enable specific bucket features, the authenticated user
2246
+ * must have the following permissions:
2247
+ *
2248
+ * - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
2249
+ * - To update public access prevention policies or access control lists
2250
+ * (ACLs): `storage.buckets.setIamPolicy`
2251
+ *
2252
+ * @param {Object} request
2253
+ * The request object that will be sent.
2254
+ * @param {google.storage.v2.Bucket} request.bucket
2255
+ * Required. The bucket to update.
2256
+ * The bucket's `name` field is used to identify the bucket.
2257
+ * @param {number} request.ifMetagenerationMatch
2258
+ * If set, the request modifies the bucket if its metageneration matches this
2259
+ * value.
2260
+ * @param {number} request.ifMetagenerationNotMatch
2261
+ * If set, the request modifies the bucket if its metageneration doesn't
2262
+ * match this value.
2263
+ * @param {string} [request.predefinedAcl]
2264
+ * Optional. Apply a predefined set of access controls to this bucket.
2265
+ * Valid values are `authenticatedRead`, `private`, `projectPrivate`,
2266
+ * `publicRead`, or `publicReadWrite`.
2267
+ * @param {string} [request.predefinedDefaultObjectAcl]
2268
+ * Optional. Apply a predefined set of default object access controls to this
2269
+ * bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
2270
+ * `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
2271
+ * @param {google.protobuf.FieldMask} request.updateMask
2272
+ * Required. List of fields to be updated.
2273
+ *
2274
+ * To specify ALL fields, equivalent to the JSON API's "update" function,
2275
+ * specify a single field with the value `*`. Note: not recommended. If a new
2276
+ * field is introduced at a later time, an older client updating with the `*`
2277
+ * might accidentally reset the new field's value.
2278
+ *
2279
+ * Not specifying any fields is an error.
2280
+ * @param {object} [options]
2281
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2282
+ * @returns {Promise} - The promise which resolves to an array.
2283
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2284
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2285
+ * for more details and examples.
2286
+ * @example <caption>include:samples/generated/v2/storage.update_bucket.js</caption>
2287
+ * region_tag:storage_v2_generated_Storage_UpdateBucket_async
2288
+ */
1224
2289
  updateBucket(request, optionsOrCallback, callback) {
1225
2290
  request = request || {};
1226
2291
  let options;
@@ -1236,6 +2301,53 @@ class StorageControlClient {
1236
2301
  }
1237
2302
  return this.storageClient.updateBucket(request, options, callback);
1238
2303
  }
2304
+ /**
2305
+ * Retrieves a list of buckets for a given project, ordered
2306
+ * lexicographically by name.
2307
+ *
2308
+ * **IAM Permissions**:
2309
+ *
2310
+ * Requires `storage.buckets.list` IAM permission on the bucket.
2311
+ * Additionally, to enable specific bucket features, the authenticated
2312
+ * user must have the following permissions:
2313
+ *
2314
+ * - To list the IAM policies: `storage.buckets.getIamPolicy`
2315
+ * - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
2316
+ *
2317
+ * @param {Object} request
2318
+ * The request object that will be sent.
2319
+ * @param {string} request.parent
2320
+ * Required. The project whose buckets we are listing.
2321
+ * @param {number} [request.pageSize]
2322
+ * Optional. Maximum number of buckets to return in a single response. The
2323
+ * service uses this parameter or `1,000` items, whichever is smaller. If
2324
+ * `acl` is present in the `read_mask`, the service uses this parameter of
2325
+ * `200` items, whichever is smaller.
2326
+ * @param {string} [request.pageToken]
2327
+ * Optional. A previously-returned page token representing part of the larger
2328
+ * set of results to view.
2329
+ * @param {string} [request.prefix]
2330
+ * Optional. Filter results to buckets whose names begin with this prefix.
2331
+ * @param {google.protobuf.FieldMask} request.readMask
2332
+ * Mask specifying which fields to read from each result.
2333
+ * If no mask is specified, it defaults to all fields except `items.
2334
+ * owner`, `items.acl`, and `items.default_object_acl`.
2335
+ * `*` might be used to mean "all fields".
2336
+ * @param {boolean} [request.returnPartialSuccess]
2337
+ * Optional. Allows listing of buckets, even if there are buckets that are
2338
+ * unreachable.
2339
+ * @param {object} [options]
2340
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2341
+ * @returns {Promise} - The promise which resolves to an array.
2342
+ * The first element of the array is Array of {@link protos.google.storage.v2.Bucket|Bucket}.
2343
+ * The client library will perform auto-pagination by default: it will call the API as many
2344
+ * times as needed and will merge results from all the pages into this array.
2345
+ * Note that it can affect your quota.
2346
+ * We recommend using `listBucketsAsync()`
2347
+ * method described below for async iteration which you can stop as needed.
2348
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2349
+ * for more details and examples.
2350
+ */
1239
2351
  listBuckets(request, optionsOrCallback, callback) {
1240
2352
  request = request || {};
1241
2353
  let options;