@google-cloud/storage-control 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,34 @@ class StorageControlClient {
448
979
  checkRenameFolderProgress(name) {
449
980
  return this.storageControlInternal.checkRenameFolderProgress(name);
450
981
  }
982
+ /**
983
+ * Creates an Anywhere Cache instance.
984
+ *
985
+ * @param {Object} request
986
+ * The request object that will be sent.
987
+ * @param {string} request.parent
988
+ * Required. The bucket to which this cache belongs.
989
+ * Format: `projects/{project}/buckets/{bucket}`
990
+ * @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
991
+ * Required. Properties of the Anywhere Cache instance being created.
992
+ * The parent bucket name is specified in the `parent` field. Server uses the
993
+ * default value of `ttl` or `admission_policy` if not specified in
994
+ * request.
995
+ * @param {string} [request.requestId]
996
+ * Optional. A unique identifier for this request. UUID is the recommended
997
+ * format, but other formats are still accepted. This request is only
998
+ * idempotent if a `request_id` is provided.
999
+ * @param {object} [options]
1000
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1001
+ * @returns {Promise} - The promise which resolves to an array.
1002
+ * The first element of the array is an object representing
1003
+ * a long running operation. Its `promise()` method returns a promise
1004
+ * you can `await` for.
1005
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
1006
+ * for more details and examples.
1007
+ * @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
1008
+ * region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
1009
+ */
451
1010
  createAnywhereCache(request, optionsOrCallback, callback) {
452
1011
  request = request || {};
453
1012
  let options;
@@ -477,6 +1036,39 @@ class StorageControlClient {
477
1036
  checkCreateAnywhereCacheProgress(name) {
478
1037
  return this.storageControlInternal.checkCreateAnywhereCacheProgress(name);
479
1038
  }
1039
+ /**
1040
+ * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
1041
+ * `admission_policy`.
1042
+ *
1043
+ * @param {Object} request
1044
+ * The request object that will be sent.
1045
+ * @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
1046
+ * Required. The Anywhere Cache instance to be updated.
1047
+ * @param {google.protobuf.FieldMask} request.updateMask
1048
+ * Required. List of fields to be updated. Mutable fields of AnywhereCache
1049
+ * include `ttl` and `admission_policy`.
1050
+ *
1051
+ * To specify ALL fields, specify a single field with the value `*`. Note: We
1052
+ * recommend against doing this. If a new field is introduced at a later time,
1053
+ * an older client updating with the `*` may accidentally reset the new
1054
+ * field's value.
1055
+ *
1056
+ * Not specifying any fields is an error.
1057
+ * @param {string} [request.requestId]
1058
+ * Optional. A unique identifier for this request. UUID is the recommended
1059
+ * format, but other formats are still accepted. This request is only
1060
+ * idempotent if a `request_id` is provided.
1061
+ * @param {object} [options]
1062
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1063
+ * @returns {Promise} - The promise which resolves to an array.
1064
+ * The first element of the array is an object representing
1065
+ * a long running operation. Its `promise()` method returns a promise
1066
+ * you can `await` for.
1067
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
1068
+ * for more details and examples.
1069
+ * @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
1070
+ * region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
1071
+ */
480
1072
  updateAnywhereCache(request, optionsOrCallback, callback) {
481
1073
  request = request || {};
482
1074
  let options;
@@ -506,6 +1098,53 @@ class StorageControlClient {
506
1098
  checkUpdateAnywhereCacheProgress(name) {
507
1099
  return this.storageControlInternal.checkUpdateAnywhereCacheProgress(name);
508
1100
  }
1101
+ /**
1102
+ * Retrieves a list of folders. This operation is only applicable to a
1103
+ * hierarchical namespace enabled bucket.
1104
+ *
1105
+ * @param {Object} request
1106
+ * The request object that will be sent.
1107
+ * @param {string} request.parent
1108
+ * Required. Name of the bucket in which to look for folders. The bucket must
1109
+ * be a hierarchical namespace enabled bucket.
1110
+ * @param {number} [request.pageSize]
1111
+ * Optional. Maximum number of folders to return in a single response. The
1112
+ * service will use this parameter or 1,000 items, whichever is smaller.
1113
+ * @param {string} [request.pageToken]
1114
+ * Optional. A previously-returned page token representing part of the larger
1115
+ * set of results to view.
1116
+ * @param {string} [request.prefix]
1117
+ * Optional. Filter results to folders whose names begin with this prefix.
1118
+ * If set, the value must either be an empty string or end with a '/'.
1119
+ * @param {string} [request.delimiter]
1120
+ * Optional. If set, returns results in a directory-like mode. The results
1121
+ * will only include folders that either exactly match the above prefix, or
1122
+ * are one level below the prefix. The only supported value is '/'.
1123
+ * @param {string} [request.lexicographicStart]
1124
+ * Optional. Filter results to folders whose names are lexicographically equal
1125
+ * to or after lexicographic_start. If lexicographic_end is also set, the
1126
+ * folders listed have names between lexicographic_start (inclusive) and
1127
+ * lexicographic_end (exclusive).
1128
+ * @param {string} [request.lexicographicEnd]
1129
+ * Optional. Filter results to folders whose names are lexicographically
1130
+ * before lexicographic_end. If lexicographic_start is also set, the folders
1131
+ * listed have names between lexicographic_start (inclusive) and
1132
+ * lexicographic_end (exclusive).
1133
+ * @param {string} [request.requestId]
1134
+ * Optional. A unique identifier for this request. UUID is the recommended
1135
+ * format, but other formats are still accepted.
1136
+ * @param {object} [options]
1137
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1138
+ * @returns {Promise} - The promise which resolves to an array.
1139
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.Folder|Folder}.
1140
+ * The client library will perform auto-pagination by default: it will call the API as many
1141
+ * times as needed and will merge results from all the pages into this array.
1142
+ * Note that it can affect your quota.
1143
+ * We recommend using `listFoldersAsync()`
1144
+ * method described below for async iteration which you can stop as needed.
1145
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1146
+ * for more details and examples.
1147
+ */
509
1148
  listFolders(request, optionsOrCallback, callback) {
510
1149
  request = request || {};
511
1150
  let options;
@@ -618,6 +1257,37 @@ class StorageControlClient {
618
1257
  listFoldersAsync(request, options) {
619
1258
  return this.storageControlInternal.listFoldersAsync(request, options);
620
1259
  }
1260
+ /**
1261
+ * Retrieves a list of managed folders for a given bucket.
1262
+ *
1263
+ * @param {Object} request
1264
+ * The request object that will be sent.
1265
+ * @param {string} request.parent
1266
+ * Required. Name of the bucket this managed folder belongs to.
1267
+ * @param {number} [request.pageSize]
1268
+ * Optional. Maximum number of managed folders to return in a single response.
1269
+ * The service will use this parameter or 1,000 items, whichever is smaller.
1270
+ * @param {string} [request.pageToken]
1271
+ * Optional. A previously-returned page token representing part of the larger
1272
+ * set of results to view.
1273
+ * @param {string} [request.prefix]
1274
+ * Optional. Filter results to match managed folders with name starting with
1275
+ * this prefix.
1276
+ * @param {string} [request.requestId]
1277
+ * Optional. A unique identifier for this request. UUID is the recommended
1278
+ * format, but other formats are still accepted.
1279
+ * @param {object} [options]
1280
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1281
+ * @returns {Promise} - The promise which resolves to an array.
1282
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
1283
+ * The client library will perform auto-pagination by default: it will call the API as many
1284
+ * times as needed and will merge results from all the pages into this array.
1285
+ * Note that it can affect your quota.
1286
+ * We recommend using `listManagedFoldersAsync()`
1287
+ * method described below for async iteration which you can stop as needed.
1288
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1289
+ * for more details and examples.
1290
+ */
621
1291
  listManagedFolders(request, optionsOrCallback, callback) {
622
1292
  request = request || {};
623
1293
  let options;
@@ -700,6 +1370,34 @@ class StorageControlClient {
700
1370
  listManagedFoldersAsync(request, options) {
701
1371
  return this.storageControlInternal.listManagedFoldersAsync(request, options);
702
1372
  }
1373
+ /**
1374
+ * Lists Anywhere Cache instances for a given bucket.
1375
+ *
1376
+ * @param {Object} request
1377
+ * The request object that will be sent.
1378
+ * @param {string} request.parent
1379
+ * Required. The bucket to which this cache belongs.
1380
+ * @param {number} request.pageSize
1381
+ * Maximum number of caches to return in a single response.
1382
+ * The service will use this parameter or 1,000 items, whichever is smaller.
1383
+ * @param {string} request.pageToken
1384
+ * A previously-returned page token representing part of the larger set of
1385
+ * results to view.
1386
+ * @param {string} [request.requestId]
1387
+ * Optional. A unique identifier for this request. UUID is the recommended
1388
+ * format, but other formats are still accepted.
1389
+ * @param {object} [options]
1390
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1391
+ * @returns {Promise} - The promise which resolves to an array.
1392
+ * The first element of the array is Array of {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
1393
+ * The client library will perform auto-pagination by default: it will call the API as many
1394
+ * times as needed and will merge results from all the pages into this array.
1395
+ * Note that it can affect your quota.
1396
+ * We recommend using `listAnywhereCachesAsync()`
1397
+ * method described below for async iteration which you can stop as needed.
1398
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1399
+ * for more details and examples.
1400
+ */
703
1401
  listAnywhereCaches(request, optionsOrCallback, callback) {
704
1402
  request = request || {};
705
1403
  let options;
@@ -776,6 +1474,36 @@ class StorageControlClient {
776
1474
  listAnywhereCachesAsync(request, options) {
777
1475
  return this.storageControlInternal.listAnywhereCachesAsync(request, options);
778
1476
  }
1477
+ /**
1478
+ * Gets the latest state of a long-running operation. Clients can use this
1479
+ * method to poll the operation result at intervals as recommended by the API
1480
+ * service.
1481
+ *
1482
+ * @param {Object} request - The request object that will be sent.
1483
+ * @param {string} request.name - The name of the operation resource.
1484
+ * @param {Object=} options
1485
+ * Optional parameters. You can override the default settings for this call,
1486
+ * e.g, timeout, retries, paginations, etc. See {@link
1487
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1488
+ * for the details.
1489
+ * @param {function(?Error, ?Object)=} callback
1490
+ * The function which will be called with the result of the API call.
1491
+ *
1492
+ * The second parameter to the callback is an object representing
1493
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1494
+ * @return {Promise} - The promise which resolves to an array.
1495
+ * The first element of the array is an object representing
1496
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
1497
+ * The promise has a method named "cancel" which cancels the ongoing API call.
1498
+ *
1499
+ * @example
1500
+ * ```
1501
+ * const client = longrunning.operationsClient();
1502
+ * const name = '';
1503
+ * const [response] = await client.getOperation({name});
1504
+ * // doThingsWith(response)
1505
+ * ```
1506
+ */
779
1507
  getOperation(request, optionsOrCallback, callback) {
780
1508
  request = request || {};
781
1509
  let options;
@@ -824,6 +1552,37 @@ class StorageControlClient {
824
1552
  listOperationsAsync(request, options) {
825
1553
  return this.storageControlInternal.listOperationsAsync(request, options);
826
1554
  }
1555
+ /**
1556
+ * Starts asynchronous cancellation on a long-running operation. The server
1557
+ * makes a best effort to cancel the operation, but success is not
1558
+ * guaranteed. If the server doesn't support this method, it returns
1559
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
1560
+ * {@link Operations.GetOperation} or
1561
+ * other methods to check whether the cancellation succeeded or whether the
1562
+ * operation completed despite cancellation. On successful cancellation,
1563
+ * the operation is not deleted; instead, it becomes an operation with
1564
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
1565
+ * 1, corresponding to `Code.CANCELLED`.
1566
+ *
1567
+ * @param {Object} request - The request object that will be sent.
1568
+ * @param {string} request.name - The name of the operation resource to be cancelled.
1569
+ * @param {Object=} options
1570
+ * Optional parameters. You can override the default settings for this call,
1571
+ * e.g, timeout, retries, paginations, etc. See {@link
1572
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
1573
+ * details.
1574
+ * @param {function(?Error)=} callback
1575
+ * The function which will be called with the result of the API call.
1576
+ * @return {Promise} - The promise which resolves when API call finishes.
1577
+ * The promise has a method named "cancel" which cancels the ongoing API
1578
+ * call.
1579
+ *
1580
+ * @example
1581
+ * ```
1582
+ * const client = longrunning.operationsClient();
1583
+ * await client.cancelOperation({name: ''});
1584
+ * ```
1585
+ */
827
1586
  cancelOperation(request, optionsOrCallback, callback) {
828
1587
  request = request || {};
829
1588
  let options;
@@ -839,6 +1598,31 @@ class StorageControlClient {
839
1598
  }
840
1599
  return this.storageControlInternal.cancelOperation(request, options, callback);
841
1600
  }
1601
+ /**
1602
+ * Deletes a long-running operation. This method indicates that the client is
1603
+ * no longer interested in the operation result. It does not cancel the
1604
+ * operation. If the server doesn't support this method, it returns
1605
+ * `google.rpc.Code.UNIMPLEMENTED`.
1606
+ *
1607
+ * @param {Object} request - The request object that will be sent.
1608
+ * @param {string} request.name - The name of the operation resource to be deleted.
1609
+ * @param {Object=} options
1610
+ * Optional parameters. You can override the default settings for this call,
1611
+ * e.g, timeout, retries, paginations, etc. See {@link
1612
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
1613
+ * for the details.
1614
+ * @param {function(?Error)=} callback
1615
+ * The function which will be called with the result of the API call.
1616
+ * @return {Promise} - The promise which resolves when API call finishes.
1617
+ * The promise has a method named "cancel" which cancels the ongoing API
1618
+ * call.
1619
+ *
1620
+ * @example
1621
+ * ```
1622
+ * const client = longrunning.operationsClient();
1623
+ * await client.deleteOperation({name: ''});
1624
+ * ```
1625
+ */
842
1626
  deleteOperation(request, optionsOrCallback, callback) {
843
1627
  request = request || {};
844
1628
  let options;
@@ -1161,6 +1945,53 @@ class StorageControlClient {
1161
1945
  this.storageClient.close(),
1162
1946
  ]).then(() => { });
1163
1947
  }
1948
+ // -------------------
1949
+ // -- Service calls --
1950
+ // -------------------
1951
+ /**
1952
+ * Permanently deletes an empty bucket.
1953
+ * The request fails if there are any live or
1954
+ * noncurrent objects in the bucket, but the request succeeds if the
1955
+ * bucket only contains soft-deleted objects or incomplete uploads, such
1956
+ * as ongoing XML API multipart uploads. Does not permanently delete
1957
+ * soft-deleted objects.
1958
+ *
1959
+ * When this API is used to delete a bucket containing an object that has a
1960
+ * soft delete policy
1961
+ * enabled, the object becomes soft deleted, and the
1962
+ * `softDeleteTime` and `hardDeleteTime` properties are set on the
1963
+ * object.
1964
+ *
1965
+ * Objects and multipart uploads that were in the bucket at the time of
1966
+ * deletion are also retained for the specified retention duration. When
1967
+ * a soft-deleted bucket reaches the end of its retention duration, it
1968
+ * is permanently deleted. The `hardDeleteTime` of the bucket always
1969
+ * equals
1970
+ * or exceeds the expiration time of the last soft-deleted object in the
1971
+ * bucket.
1972
+ *
1973
+ * **IAM Permissions**:
1974
+ *
1975
+ * Requires `storage.buckets.delete` IAM permission on the bucket.
1976
+ *
1977
+ * @param {Object} request
1978
+ * The request object that will be sent.
1979
+ * @param {string} request.name
1980
+ * Required. Name of a bucket to delete.
1981
+ * @param {number} request.ifMetagenerationMatch
1982
+ * If set, only deletes the bucket if its metageneration matches this value.
1983
+ * @param {number} request.ifMetagenerationNotMatch
1984
+ * If set, only deletes the bucket if its metageneration does not match this
1985
+ * value.
1986
+ * @param {object} [options]
1987
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1988
+ * @returns {Promise} - The promise which resolves to an array.
1989
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
1990
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1991
+ * for more details and examples.
1992
+ * @example <caption>include:samples/generated/v2/storage.delete_bucket.js</caption>
1993
+ * region_tag:storage_v2_generated_Storage_DeleteBucket_async
1994
+ */
1164
1995
  deleteBucket(request, optionsOrCallback, callback) {
1165
1996
  request = request || {};
1166
1997
  let options;
@@ -1176,6 +2007,42 @@ class StorageControlClient {
1176
2007
  }
1177
2008
  return this.storageClient.deleteBucket(request, options, callback);
1178
2009
  }
2010
+ /**
2011
+ * Returns metadata for the specified bucket.
2012
+ *
2013
+ * **IAM Permissions**:
2014
+ *
2015
+ * Requires `storage.buckets.get`
2016
+ * IAM permission on
2017
+ * the bucket. Additionally, to return specific bucket metadata, the
2018
+ * authenticated user must have the following permissions:
2019
+ *
2020
+ * - To return the IAM policies: `storage.buckets.getIamPolicy`
2021
+ * - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
2022
+ *
2023
+ * @param {Object} request
2024
+ * The request object that will be sent.
2025
+ * @param {string} request.name
2026
+ * Required. Name of a bucket.
2027
+ * @param {number} request.ifMetagenerationMatch
2028
+ * If set, only gets the bucket metadata if its metageneration matches this
2029
+ * value.
2030
+ * @param {number} request.ifMetagenerationNotMatch
2031
+ * If set, and if the bucket's current metageneration matches the specified
2032
+ * value, the request returns an error.
2033
+ * @param {google.protobuf.FieldMask} request.readMask
2034
+ * Mask specifying which fields to read.
2035
+ * A `*` field might be used to indicate all fields.
2036
+ * If no mask is specified, it defaults to all fields.
2037
+ * @param {object} [options]
2038
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2039
+ * @returns {Promise} - The promise which resolves to an array.
2040
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2041
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2042
+ * for more details and examples.
2043
+ * @example <caption>include:samples/generated/v2/storage.get_bucket.js</caption>
2044
+ * region_tag:storage_v2_generated_Storage_GetBucket_async
2045
+ */
1179
2046
  getBucket(request, optionsOrCallback, callback) {
1180
2047
  request = request || {};
1181
2048
  let options;
@@ -1191,6 +2058,56 @@ class StorageControlClient {
1191
2058
  }
1192
2059
  return this.storageClient.getBucket(request, options, callback);
1193
2060
  }
2061
+ /**
2062
+ * Creates a new bucket.
2063
+ *
2064
+ * **IAM Permissions**:
2065
+ *
2066
+ * Requires `storage.buckets.create` IAM permission on the bucket.
2067
+ * Additionally, to enable specific bucket features, the authenticated user
2068
+ * must have the following permissions:
2069
+ *
2070
+ * - To enable object retention using the `enableObjectRetention` query
2071
+ * parameter: `storage.buckets.enableObjectRetention`
2072
+ * - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
2073
+ *
2074
+ * @param {Object} request
2075
+ * The request object that will be sent.
2076
+ * @param {string} request.parent
2077
+ * Required. The project to which this bucket belongs. This field must either
2078
+ * be empty or `projects/_`. The project ID that owns this bucket should be
2079
+ * specified in the `bucket.project` field.
2080
+ * @param {google.storage.v2.Bucket} [request.bucket]
2081
+ * Optional. Properties of the new bucket being inserted.
2082
+ * The name of the bucket is specified in the `bucket_id` field. Populating
2083
+ * `bucket.name` field results in an error.
2084
+ * The project of the bucket must be specified in the `bucket.project` field.
2085
+ * This field must be in `projects/{projectIdentifier}` format,
2086
+ * {projectIdentifier} can be the project ID or project number. The `parent`
2087
+ * field must be either empty or `projects/_`.
2088
+ * @param {string} request.bucketId
2089
+ * Required. The ID to use for this bucket, which becomes the final component
2090
+ * of the bucket's resource name. For example, the value `foo` might result in
2091
+ * a bucket with the name `projects/123456/buckets/foo`.
2092
+ * @param {string} [request.predefinedAcl]
2093
+ * Optional. Apply a predefined set of access controls to this bucket.
2094
+ * Valid values are `authenticatedRead`, `private`, `projectPrivate`,
2095
+ * `publicRead`, or `publicReadWrite`.
2096
+ * @param {string} [request.predefinedDefaultObjectAcl]
2097
+ * Optional. Apply a predefined set of default object access controls to this
2098
+ * bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
2099
+ * `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
2100
+ * @param {boolean} [request.enableObjectRetention]
2101
+ * Optional. If true, enable object retention on the bucket.
2102
+ * @param {object} [options]
2103
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2104
+ * @returns {Promise} - The promise which resolves to an array.
2105
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2106
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2107
+ * for more details and examples.
2108
+ * @example <caption>include:samples/generated/v2/storage.create_bucket.js</caption>
2109
+ * region_tag:storage_v2_generated_Storage_CreateBucket_async
2110
+ */
1194
2111
  createBucket(request, optionsOrCallback, callback) {
1195
2112
  request = request || {};
1196
2113
  let options;
@@ -1206,6 +2123,43 @@ class StorageControlClient {
1206
2123
  }
1207
2124
  return this.storageClient.createBucket(request, options, callback);
1208
2125
  }
2126
+ /**
2127
+ * Permanently locks the retention
2128
+ * policy that is
2129
+ * currently applied to the specified bucket.
2130
+ *
2131
+ * Caution: Locking a bucket is an
2132
+ * irreversible action. Once you lock a bucket:
2133
+ *
2134
+ * - You cannot remove the retention policy from the bucket.
2135
+ * - You cannot decrease the retention period for the policy.
2136
+ *
2137
+ * Once locked, you must delete the entire bucket in order to remove the
2138
+ * bucket's retention policy. However, before you can delete the bucket, you
2139
+ * must delete all the objects in the bucket, which is only
2140
+ * possible if all the objects have reached the retention period set by the
2141
+ * retention policy.
2142
+ *
2143
+ * **IAM Permissions**:
2144
+ *
2145
+ * Requires `storage.buckets.update` IAM permission on the bucket.
2146
+ *
2147
+ * @param {Object} request
2148
+ * The request object that will be sent.
2149
+ * @param {string} request.bucket
2150
+ * Required. Name of a bucket.
2151
+ * @param {number} request.ifMetagenerationMatch
2152
+ * Required. Makes the operation conditional on whether bucket's current
2153
+ * metageneration matches the given value. Must be positive.
2154
+ * @param {object} [options]
2155
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2156
+ * @returns {Promise} - The promise which resolves to an array.
2157
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2158
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2159
+ * for more details and examples.
2160
+ * @example <caption>include:samples/generated/v2/storage.lock_bucket_retention_policy.js</caption>
2161
+ * region_tag:storage_v2_generated_Storage_LockBucketRetentionPolicy_async
2162
+ */
1209
2163
  lockBucketRetentionPolicy(request, optionsOrCallback, callback) {
1210
2164
  request = request || {};
1211
2165
  let options;
@@ -1221,6 +2175,58 @@ class StorageControlClient {
1221
2175
  }
1222
2176
  return this.storageClient.lockBucketRetentionPolicy(request, options, callback);
1223
2177
  }
2178
+ /**
2179
+ * Updates a bucket. Changes to the bucket are readable immediately after
2180
+ * writing, but configuration changes might take time to propagate. This
2181
+ * method supports `patch` semantics.
2182
+ *
2183
+ * **IAM Permissions**:
2184
+ *
2185
+ * Requires `storage.buckets.update` IAM permission on the bucket.
2186
+ * Additionally, to enable specific bucket features, the authenticated user
2187
+ * must have the following permissions:
2188
+ *
2189
+ * - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
2190
+ * - To update public access prevention policies or access control lists
2191
+ * (ACLs): `storage.buckets.setIamPolicy`
2192
+ *
2193
+ * @param {Object} request
2194
+ * The request object that will be sent.
2195
+ * @param {google.storage.v2.Bucket} request.bucket
2196
+ * Required. The bucket to update.
2197
+ * The bucket's `name` field is used to identify the bucket.
2198
+ * @param {number} request.ifMetagenerationMatch
2199
+ * If set, the request modifies the bucket if its metageneration matches this
2200
+ * value.
2201
+ * @param {number} request.ifMetagenerationNotMatch
2202
+ * If set, the request modifies the bucket if its metageneration doesn't
2203
+ * match this value.
2204
+ * @param {string} [request.predefinedAcl]
2205
+ * Optional. Apply a predefined set of access controls to this bucket.
2206
+ * Valid values are `authenticatedRead`, `private`, `projectPrivate`,
2207
+ * `publicRead`, or `publicReadWrite`.
2208
+ * @param {string} [request.predefinedDefaultObjectAcl]
2209
+ * Optional. Apply a predefined set of default object access controls to this
2210
+ * bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
2211
+ * `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
2212
+ * @param {google.protobuf.FieldMask} request.updateMask
2213
+ * Required. List of fields to be updated.
2214
+ *
2215
+ * To specify ALL fields, equivalent to the JSON API's "update" function,
2216
+ * specify a single field with the value `*`. Note: not recommended. If a new
2217
+ * field is introduced at a later time, an older client updating with the `*`
2218
+ * might accidentally reset the new field's value.
2219
+ *
2220
+ * Not specifying any fields is an error.
2221
+ * @param {object} [options]
2222
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2223
+ * @returns {Promise} - The promise which resolves to an array.
2224
+ * The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
2225
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2226
+ * for more details and examples.
2227
+ * @example <caption>include:samples/generated/v2/storage.update_bucket.js</caption>
2228
+ * region_tag:storage_v2_generated_Storage_UpdateBucket_async
2229
+ */
1224
2230
  updateBucket(request, optionsOrCallback, callback) {
1225
2231
  request = request || {};
1226
2232
  let options;
@@ -1236,6 +2242,53 @@ class StorageControlClient {
1236
2242
  }
1237
2243
  return this.storageClient.updateBucket(request, options, callback);
1238
2244
  }
2245
+ /**
2246
+ * Retrieves a list of buckets for a given project, ordered
2247
+ * lexicographically by name.
2248
+ *
2249
+ * **IAM Permissions**:
2250
+ *
2251
+ * Requires `storage.buckets.list` IAM permission on the bucket.
2252
+ * Additionally, to enable specific bucket features, the authenticated
2253
+ * user must have the following permissions:
2254
+ *
2255
+ * - To list the IAM policies: `storage.buckets.getIamPolicy`
2256
+ * - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
2257
+ *
2258
+ * @param {Object} request
2259
+ * The request object that will be sent.
2260
+ * @param {string} request.parent
2261
+ * Required. The project whose buckets we are listing.
2262
+ * @param {number} [request.pageSize]
2263
+ * Optional. Maximum number of buckets to return in a single response. The
2264
+ * service uses this parameter or `1,000` items, whichever is smaller. If
2265
+ * `acl` is present in the `read_mask`, the service uses this parameter of
2266
+ * `200` items, whichever is smaller.
2267
+ * @param {string} [request.pageToken]
2268
+ * Optional. A previously-returned page token representing part of the larger
2269
+ * set of results to view.
2270
+ * @param {string} [request.prefix]
2271
+ * Optional. Filter results to buckets whose names begin with this prefix.
2272
+ * @param {google.protobuf.FieldMask} request.readMask
2273
+ * Mask specifying which fields to read from each result.
2274
+ * If no mask is specified, it defaults to all fields except `items.
2275
+ * owner`, `items.acl`, and `items.default_object_acl`.
2276
+ * `*` might be used to mean "all fields".
2277
+ * @param {boolean} [request.returnPartialSuccess]
2278
+ * Optional. Allows listing of buckets, even if there are buckets that are
2279
+ * unreachable.
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 Array of {@link protos.google.storage.v2.Bucket|Bucket}.
2284
+ * The client library will perform auto-pagination by default: it will call the API as many
2285
+ * times as needed and will merge results from all the pages into this array.
2286
+ * Note that it can affect your quota.
2287
+ * We recommend using `listBucketsAsync()`
2288
+ * method described below for async iteration which you can stop as needed.
2289
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2290
+ * for more details and examples.
2291
+ */
1239
2292
  listBuckets(request, optionsOrCallback, callback) {
1240
2293
  request = request || {};
1241
2294
  let options;