@google-cloud/storage-control
Version:
Cloud Storage API client for Node.js
3,108 lines • 160 kB
JavaScript
"use strict";
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated **
// ** All changes to this file may be overwritten. **
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageControlClient = void 0;
const storage_control_client_1 = require("./v2/storage_control_client");
const storage_client_1 = require("./v2/storage_client");
class StorageControlClient {
storageControlInternal;
storageClient;
auth;
descriptors = {
page: {},
stream: {},
longrunning: {},
batching: {},
};
warn;
innerApiCalls;
pathTemplates;
operationsClient;
storageControlStub;
/**
* @param {object} [StorageControlClientOptions] - Enables user to instantiate clients separately and use those as the subclients.
* To have sub-clients with different options, instantiate each client separately.
*/
constructor(options) {
options = options || {};
this.storageControlInternal =
options?.storageControlInternal ?? new storage_control_client_1.StorageControlClient(options);
// utilize whatever auth was created with the first client for the rest of the clients
// this will either be what the user passed into options.auth, or whatever was
// initialized by default in gax. We reuse this auth rather than instantiating a default ourselves
// so that we do not have to keep this code in sync with gax
options.auth = this.storageControlInternal.auth;
this.storageClient = options?.storageClient ?? new storage_client_1.StorageClient(options);
this.auth = this.storageControlInternal.auth;
this.descriptors = this.storageControlInternal.descriptors;
this.warn = this.storageControlInternal.warn;
this.innerApiCalls = this.storageControlInternal.innerApiCalls;
this.pathTemplates = this.storageControlInternal.pathTemplates;
this.operationsClient = this.storageControlInternal.operationsClient;
this.storageControlStub = this.storageControlInternal.storageControlStub;
}
/**
* Initialize the client.
* Performs asynchronous operations (such as authentication) and prepares the client.
* This function will be called automatically when any class method is called for the
* first time, but if you need to initialize it before calling an actual method,
* feel free to call initialize() directly.
*
* You can await on this method if you want to make sure the client is initialized.
*
* @returns {Promise} A promise that resolves to an authenticated service stub.
*/
initialize() {
return this.storageControlInternal.initialize();
}
/**
* The DNS address for this API service.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath() {
return storage_control_client_1.StorageControlClient.servicePath;
}
/**
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint() {
return storage_control_client_1.StorageControlClient.apiEndpoint;
}
/**
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
get apiEndpoint() {
return this.storageControlInternal.apiEndpoint;
}
get universeDomain() {
return this.storageControlInternal.universeDomain;
}
/**
* The port for this API service.
* @returns {number} The default port for this service.
*/
static get port() {
return storage_control_client_1.StorageControlClient.port;
}
/**
* The scopes needed to make gRPC calls for every method defined
* in this service.
* @returns {string[]} List of default scopes.
*/
static get scopes() {
return storage_control_client_1.StorageControlClient.scopes;
}
getProjectId(callback) {
if (callback) {
this.storageControlInternal.getProjectId(callback);
return;
}
return this.storageControlInternal.getProjectId();
}
// -------------------
// -- Service calls --
// -------------------
/**
* Creates a new folder. This operation is only applicable to a hierarchical
* namespace enabled bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket in which the folder will reside. The bucket
* must be a hierarchical namespace enabled bucket.
* @param {google.storage.control.v2.Folder} request.folder
* Required. Properties of the new folder being created.
* The bucket and name of the folder are specified in the parent and folder_id
* fields, respectively. Populating those fields in `folder` will result in an
* error.
* @param {string} request.folderId
* Required. The full name of a folder, including all its parent folders.
* Folders use single '/' characters as a delimiter.
* The folder_id must end with a slash.
* For example, the folder_id of "books/biographies/" would create a new
* "biographies/" folder under the "books/" folder.
* @param {boolean} [request.recursive]
* Optional. If true, parent folder doesn't have to be present and all missing
* ancestor folders will be created atomically.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.create_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_CreateFolder_async
*/
createFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.createFolder(request, options);
}
return this.storageControlInternal.createFolder(request, options, callback);
}
/**
* Permanently deletes an empty folder. This operation is only applicable to a
* hierarchical namespace enabled bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the folder.
* Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
* @param {number} request.ifMetagenerationMatch
* Makes the operation only succeed conditional on whether the folder's
* current metageneration matches the given value.
* @param {number} request.ifMetagenerationNotMatch
* Makes the operation only succeed conditional on whether the folder's
* current metageneration does not match the given value.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.delete_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_DeleteFolder_async
*/
deleteFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.deleteFolder(request, options);
}
return this.storageControlInternal.deleteFolder(request, options, callback);
}
/**
* Returns metadata for the specified folder. This operation is only
* applicable to a hierarchical namespace enabled bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the folder.
* Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
* @param {number} request.ifMetagenerationMatch
* Makes the operation only succeed conditional on whether the folder's
* current metageneration matches the given value.
* @param {number} request.ifMetagenerationNotMatch
* Makes the operation only succeed conditional on whether the folder's
* current metageneration does not match the given value.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetFolder_async
*/
getFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getFolder(request, options);
}
return this.storageControlInternal.getFolder(request, options, callback);
}
/**
* Returns the storage layout configuration for a given bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the StorageLayout resource.
* Format: `projects/{project}/buckets/{bucket}/storageLayout`
* @param {string} request.prefix
* An optional prefix used for permission check. It is useful when the caller
* only has limited permissions under a specific prefix.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.StorageLayout|StorageLayout}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_storage_layout.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetStorageLayout_async
*/
getStorageLayout(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getStorageLayout(request, options);
}
return this.storageControlInternal.getStorageLayout(request, options, callback);
}
/**
* Creates a new managed folder.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket this managed folder belongs to.
* @param {google.storage.control.v2.ManagedFolder} request.managedFolder
* Required. Properties of the managed folder being created.
* The bucket and managed folder names are specified in the `parent` and
* `managed_folder_id` fields. Populating these fields in `managed_folder`
* will result in an error.
* @param {string} request.managedFolderId
* Required. The name of the managed folder. It uses a single `/` as delimiter
* and leading and trailing `/` are allowed.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.create_managed_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_CreateManagedFolder_async
*/
createManagedFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.createManagedFolder(request, options);
}
return this.storageControlInternal.createManagedFolder(request, options, callback);
}
/**
* Permanently deletes an empty managed folder.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the managed folder.
* Format:
* `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
* @param {number} request.ifMetagenerationMatch
* The operation succeeds conditional on the managed folder's current
* metageneration matching the value here specified.
* @param {number} request.ifMetagenerationNotMatch
* The operation succeeds conditional on the managed folder's current
* metageneration NOT matching the value here specified.
* @param {boolean} request.allowNonEmpty
* Allows deletion of a managed folder even if it is not empty.
* A managed folder is empty if it manages no child managed folders or
* objects. Caller must have permission for
* storage.managedFolders.setIamPolicy.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.delete_managed_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_DeleteManagedFolder_async
*/
deleteManagedFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.deleteManagedFolder(request, options);
}
return this.storageControlInternal.deleteManagedFolder(request, options, callback);
}
/**
* Returns metadata for the specified managed folder.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the managed folder.
* Format:
* `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
* @param {number} request.ifMetagenerationMatch
* The operation succeeds conditional on the managed folder's current
* metageneration matching the value here specified.
* @param {number} request.ifMetagenerationNotMatch
* The operation succeeds conditional on the managed folder's current
* metageneration NOT matching the value here specified.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_managed_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetManagedFolder_async
*/
getManagedFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getManagedFolder(request, options);
}
return this.storageControlInternal.getManagedFolder(request, options, callback);
}
/**
* Disables an Anywhere Cache instance. A disabled instance is read-only. The
* disablement could be revoked by calling ResumeAnywhereCache. The cache
* instance will be deleted automatically if it remains in the disabled state
* for at least one hour.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name field in the request should be:
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted. This request is only
* idempotent if a `request_id` is provided.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.disable_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_DisableAnywhereCache_async
*/
disableAnywhereCache(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.disableAnywhereCache(request, options);
}
return this.storageControlInternal.disableAnywhereCache(request, options, callback);
}
/**
* Pauses an Anywhere Cache instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name field in the request should be:
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted. This request is only
* idempotent if a `request_id` is provided.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.pause_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_PauseAnywhereCache_async
*/
pauseAnywhereCache(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.pauseAnywhereCache(request, options);
}
return this.storageControlInternal.pauseAnywhereCache(request, options, callback);
}
/**
* Resumes a disabled or paused Anywhere Cache instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name field in the request should be:
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted. This request is only
* idempotent if a `request_id` is provided.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.resume_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_ResumeAnywhereCache_async
*/
resumeAnywhereCache(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.resumeAnywhereCache(request, options);
}
return this.storageControlInternal.resumeAnywhereCache(request, options, callback);
}
/**
* Gets an Anywhere Cache instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name field in the request should be:
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetAnywhereCache_async
*/
getAnywhereCache(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getAnywhereCache(request, options);
}
return this.storageControlInternal.getAnywhereCache(request, options, callback);
}
/**
* Returns the Project scoped singleton IntelligenceConfig resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `IntelligenceConfig` resource associated with
* your project.
*
* Format: `projects/{id}/locations/global/intelligenceConfig`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_project_intelligence_config.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetProjectIntelligenceConfig_async
*/
getProjectIntelligenceConfig(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getProjectIntelligenceConfig(request, options);
}
return this.storageControlInternal.getProjectIntelligenceConfig(request, options, callback);
}
/**
* Updates the Project scoped singleton IntelligenceConfig resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
* Required. The `IntelligenceConfig` resource to be updated.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. The `update_mask` that specifies the fields within the
* `IntelligenceConfig` resource that should be modified by this update. Only
* the listed fields are updated.
* @param {string} [request.requestId]
* Optional. The ID that uniquely identifies the request, preventing duplicate
* processing.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.update_project_intelligence_config.js</caption>
* region_tag:storage_v2_generated_StorageControl_UpdateProjectIntelligenceConfig_async
*/
updateProjectIntelligenceConfig(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.updateProjectIntelligenceConfig(request, options);
}
return this.storageControlInternal.updateProjectIntelligenceConfig(request, options, callback);
}
/**
* Returns the Folder scoped singleton IntelligenceConfig resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `IntelligenceConfig` resource associated with
* your folder.
*
* Format: `folders/{id}/locations/global/intelligenceConfig`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_folder_intelligence_config.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetFolderIntelligenceConfig_async
*/
getFolderIntelligenceConfig(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getFolderIntelligenceConfig(request, options);
}
return this.storageControlInternal.getFolderIntelligenceConfig(request, options, callback);
}
/**
* Updates the Folder scoped singleton IntelligenceConfig resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
* Required. The `IntelligenceConfig` resource to be updated.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. The `update_mask` that specifies the fields within the
* `IntelligenceConfig` resource that should be modified by this update. Only
* the listed fields are updated.
* @param {string} [request.requestId]
* Optional. The ID that uniquely identifies the request, preventing duplicate
* processing.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.update_folder_intelligence_config.js</caption>
* region_tag:storage_v2_generated_StorageControl_UpdateFolderIntelligenceConfig_async
*/
updateFolderIntelligenceConfig(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.updateFolderIntelligenceConfig(request, options);
}
return this.storageControlInternal.updateFolderIntelligenceConfig(request, options, callback);
}
/**
* Returns the Organization scoped singleton IntelligenceConfig resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `IntelligenceConfig` resource associated with
* your organization.
*
* Format: `organizations/{org_id}/locations/global/intelligenceConfig`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_organization_intelligence_config.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetOrganizationIntelligenceConfig_async
*/
getOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options);
}
return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options, callback);
}
/**
* Updates the Organization scoped singleton IntelligenceConfig resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
* Required. The `IntelligenceConfig` resource to be updated.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. The `update_mask` that specifies the fields within the
* `IntelligenceConfig` resource that should be modified by this update. Only
* the listed fields are updated.
* @param {string} [request.requestId]
* Optional. The ID that uniquely identifies the request, preventing duplicate
* processing.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.update_organization_intelligence_config.js</caption>
* region_tag:storage_v2_generated_StorageControl_UpdateOrganizationIntelligenceConfig_async
*/
updateOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options);
}
return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options, callback);
}
/**
* Gets the IAM policy for a specified bucket.
* The `resource` field in the request should be
* `projects/_/buckets/{bucket}` for a bucket, or
* `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
* for a managed folder.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
* @param {google.iam.v1.GetPolicyOptions} request.options
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_iam_policy.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetIamPolicy_async
*/
getIamPolicy(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getIamPolicy(request, options);
}
return this.storageControlInternal.getIamPolicy(request, options, callback);
}
/**
* Updates an IAM policy for the specified bucket.
* The `resource` field in the request should be
* `projects/_/buckets/{bucket}` for a bucket, or
* `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
* for a managed folder.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy is being specified.
* See the operation documentation for the appropriate value for this field.
* @param {google.iam.v1.Policy} request.policy
* REQUIRED: The complete policy to be applied to the `resource`. The size of
* the policy is limited to a few 10s of KB. An empty policy is a
* valid policy but certain Cloud Platform services (such as Projects)
* might reject them.
* @param {google.protobuf.FieldMask} request.updateMask
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
* the fields in the mask will be modified. If no mask is provided, the
* following default mask is used:
*
* `paths: "bindings, etag"`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.set_iam_policy.js</caption>
* region_tag:storage_v2_generated_StorageControl_SetIamPolicy_async
*/
setIamPolicy(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.setIamPolicy(request, options);
}
return this.storageControlInternal.setIamPolicy(request, options, callback);
}
/**
* Tests a set of permissions on the given bucket, object, or managed folder
* to see which, if any, are held by the caller.
* The `resource` field in the request should be
* `projects/_/buckets/{bucket}` for a bucket,
* `projects/_/buckets/{bucket}/objects/{object}` for an object, or
* `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
* for a managed folder.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
* @param {string[]} request.permissions
* The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.test_iam_permissions.js</caption>
* region_tag:storage_v2_generated_StorageControl_TestIamPermissions_async
*/
testIamPermissions(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.testIamPermissions(request, options);
}
return this.storageControlInternal.testIamPermissions(request, options, callback);
}
/**
* Gets the `IntelligenceFinding` for a project.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `IntelligenceFinding` resource.
*
* Format:
* `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceFinding|IntelligenceFinding}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_intelligence_finding.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetIntelligenceFinding_async
*/
getIntelligenceFinding(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getIntelligenceFinding(request, options);
}
return this.storageControlInternal.getIntelligenceFinding(request, options, callback);
}
/**
* Gets the `IntelligenceFindingRevision` resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `IntelligenceFindingRevision` resource.
* ## Format:
*
* `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}/revisions/{revision}`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceFindingRevision|IntelligenceFindingRevision}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.get_intelligence_finding_revision.js</caption>
* region_tag:storage_v2_generated_StorageControl_GetIntelligenceFindingRevision_async
*/
getIntelligenceFindingRevision(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getIntelligenceFindingRevision(request, options);
}
return this.storageControlInternal.getIntelligenceFindingRevision(request, options, callback);
}
/**
* Renames a source folder to a destination folder. This operation is only
* applicable to a hierarchical namespace enabled bucket. During a rename, the
* source and destination folders are locked until the long running operation
* completes.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the source folder being renamed.
* Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
* @param {string} request.destinationFolderId
* Required. The destination folder ID, e.g. `foo/bar/`.
* @param {number} request.ifMetagenerationMatch
* Makes the operation only succeed conditional on whether the source
* folder's current metageneration matches the given value.
* @param {number} request.ifMetagenerationNotMatch
* Makes the operation only succeed conditional on whether the source
* folder's current metageneration does not match the given value.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted. This request is only
* idempotent if a `request_id` is provided.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_RenameFolder_async
*/
renameFolder(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.renameFolder(request, options);
}
return this.storageControlInternal.renameFolder(request, options, callback);
}
/**
* Check the status of the long running operation returned by `renameFolder()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
* region_tag:storage_v2_generated_StorageControl_RenameFolder_async
*/
checkRenameFolderProgress(name) {
return this.storageControlInternal.checkRenameFolderProgress(name);
}
/**
* Deletes a folder recursively. This operation is only applicable to a
* hierarchical namespace enabled bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the folder being deleted, however all of its contents
* will be deleted too. Format:
* `projects/{project}/buckets/{bucket}/folders/{folder}`
* @param {number} [request.ifMetagenerationMatch]
* Optional. Makes the operation only succeed conditional on whether the root
* folder's current metageneration matches the given value.
* @param {number} [request.ifMetagenerationNotMatch]
* Optional. Makes the operation only succeed conditional on whether the root
* folder's current metageneration does not match the given value.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.delete_folder_recursive.js</caption>
* region_tag:storage_v2_generated_StorageControl_DeleteFolderRecursive_async
*/
deleteFolderRecursive(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.deleteFolderRecursive(request, options);
}
return this.storageControlInternal.deleteFolderRecursive(request, options, callback);
}
/**
* Check the status of the long running operation returned by `deleteFolderRecursive()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.delete_folder_recursive.js</caption>
* region_tag:storage_v2_generated_StorageControl_DeleteFolderRecursive_async
*/
checkDeleteFolderRecursiveProgress(name) {
return this.storageControlInternal.checkDeleteFolderRecursiveProgress(name);
}
/**
* Creates an Anywhere Cache instance.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The bucket to which this cache belongs.
* Format: `projects/{project}/buckets/{bucket}`
* @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
* Required. Properties of the Anywhere Cache instance being created.
* The parent bucket name is specified in the `parent` field. Server uses the
* default value of `ttl` or `admission_policy` if not specified in
* request.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted. This request is only
* idempotent if a `request_id` is provided.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
*/
createAnywhereCache(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.createAnywhereCache(request, options);
}
return this.storageControlInternal.createAnywhereCache(request, options, callback);
}
/**
* Check the status of the long running operation returned by `createAnywhereCache()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
*/
checkCreateAnywhereCacheProgress(name) {
return this.storageControlInternal.checkCreateAnywhereCacheProgress(name);
}
/**
* Updates an Anywhere Cache instance. Mutable fields include `ttl` and
* `admission_policy`.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
* Required. The Anywhere Cache instance to be updated.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. List of fields to be updated. Mutable fields of AnywhereCache
* include `ttl` and `admission_policy`.
*
* To specify ALL fields, specify a single field with the value `*`. Note: We
* recommend against doing this. If a new field is introduced at a later time,
* an older client updating with the `*` may accidentally reset the new
* field's value.
*
* Not specifying any fields is an error.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted. This request is only
* idempotent if a `request_id` is provided.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
*/
updateAnywhereCache(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.updateAnywhereCache(request, options);
}
return this.storageControlInternal.updateAnywhereCache(request, options, callback);
}
/**
* Check the status of the long running operation returned by `updateAnywhereCache()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
* region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
*/
checkUpdateAnywhereCacheProgress(name) {
return this.storageControlInternal.checkUpdateAnywhereCacheProgress(name);
}
/**
* Retrieves a list of folders. This operation is only applicable to a
* hierarchical namespace enabled bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket in which to look for folders. The bucket must
* be a hierarchical namespace enabled bucket.
* @param {number} [request.pageSize]
* Optional. Maximum number of folders to return in a single response. The
* service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to folders whose names begin with this prefix.
* If set, the value must either be an empty string or end with a '/'.
* @param {string} [request.delimiter]
* Optional. If set, returns results in a directory-like mode. The results
* will only include folders that either exactly match the above prefix, or
* are one level below the prefix. The only supported value is '/'.
* @param {string} [request.lexicographicStart]
* Optional. Filter results to folders whose names are lexicographically equal
* to or after lexicographic_start. If lexicographic_end is also set, the
* folders listed have names between lexicographic_start (inclusive) and
* lexicographic_end (exclusive).
* @param {string} [request.lexicographicEnd]
* Optional. Filter results to folders whose names are lexicographically
* before lexicographic_end. If lexicographic_start is also set, the folders
* listed have names between lexicographic_start (inclusive) and
* lexicographic_end (exclusive).
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.control.v2.Folder|Folder}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listFoldersAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listFolders(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.listFolders(request, options);
}
return this.storageControlInternal.listFolders(request, options, callback);
}
/**
* Equivalent to `listFolders`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket in which to look for folders. The bucket must
* be a hierarchical namespace enabled bucket.
* @param {number} [request.pageSize]
* Optional. Maximum number of folders to return in a single response. The
* service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to folders whose names begin with this prefix.
* If set, the value must either be an empty string or end with a '/'.
* @param {string} [request.delimiter]
* Optional. If set, returns results in a directory-like mode. The results
* will only include folders that either exactly match the above prefix, or
* are one level below the prefix. The only supported value is '/'.
* @param {string} [request.lexicographicStart]
* Optional. Filter results to folders whose names are lexicographically equal
* to or after lexicographic_start. If lexicographic_end is also set, the
* folders listed have names between lexicographic_start (inclusive) and
* lexicographic_end (exclusive).
* @param {string} [request.lexicographicEnd]
* Optional. Filter results to folders whose names are lexicographically
* before lexicographic_end. If lexicographic_start is also set, the folders
* listed have names between lexicographic_start (inclusive) and
* lexicographic_end (exclusive).
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.control.v2.Folder|Folder} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listFoldersAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listFoldersStream(request, options) {
return this.storageControlInternal.listFoldersStream(request, options);
}
/**
* Equivalent to `listFolders`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket in which to look for folders. The bucket must
* be a hierarchical namespace enabled bucket.
* @param {number} [request.pageSize]
* Optional. Maximum number of folders to return in a single response. The
* service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to folders whose names begin with this prefix.
* If set, the value must either be an empty string or end with a '/'.
* @param {string} [request.delimiter]
* Optional. If set, returns results in a directory-like mode. The results
* will only include folders that either exactly match the above prefix, or
* are one level below the prefix. The only supported value is '/'.
* @param {string} [request.lexicographicStart]
* Optional. Filter results to folders whose names are lexicographically equal
* to or after lexicographic_start. If lexicographic_end is also set, the
* folders listed have names between lexicographic_start (inclusive) and
* lexicographic_end (exclusive).
* @param {string} [request.lexicographicEnd]
* Optional. Filter results to folders whose names are lexicographically
* before lexicographic_end. If lexicographic_start is also set, the folders
* listed have names between lexicographic_start (inclusive) and
* lexicographic_end (exclusive).
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.control.v2.Folder|Folder}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.list_folders.js</caption>
* region_tag:storage_v2_generated_StorageControl_ListFolders_async
*/
listFoldersAsync(request, options) {
return this.storageControlInternal.listFoldersAsync(request, options);
}
/**
* Retrieves a list of managed folders for a given bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket this managed folder belongs to.
* @param {number} [request.pageSize]
* Optional. Maximum number of managed folders to return in a single response.
* The service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to match managed folders with name starting with
* this prefix.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listManagedFoldersAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listManagedFolders(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.listManagedFolders(request, options);
}
return this.storageControlInternal.listManagedFolders(request, options, callback);
}
/**
* Equivalent to `listManagedFolders`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket this managed folder belongs to.
* @param {number} [request.pageSize]
* Optional. Maximum number of managed folders to return in a single response.
* The service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to match managed folders with name starting with
* this prefix.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listManagedFoldersAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listManagedFoldersStream(request, options) {
return this.storageControlInternal.listManagedFoldersStream(request, options);
}
/**
* Equivalent to `listManagedFolders`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Name of the bucket this managed folder belongs to.
* @param {number} [request.pageSize]
* Optional. Maximum number of managed folders to return in a single response.
* The service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to match managed folders with name starting with
* this prefix.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.list_managed_folders.js</caption>
* region_tag:storage_v2_generated_StorageControl_ListManagedFolders_async
*/
listManagedFoldersAsync(request, options) {
return this.storageControlInternal.listManagedFoldersAsync(request, options);
}
/**
* Lists Anywhere Cache instances for a given bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The bucket to which this cache belongs.
* @param {number} request.pageSize
* Maximum number of caches to return in a single response.
* The service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} request.pageToken
* A previously-returned page token representing part of the larger set of
* results to view.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listAnywhereCachesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listAnywhereCaches(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.listAnywhereCaches(request, options);
}
return this.storageControlInternal.listAnywhereCaches(request, options, callback);
}
/**
* Equivalent to `listAnywhereCaches`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The bucket to which this cache belongs.
* @param {number} request.pageSize
* Maximum number of caches to return in a single response.
* The service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} request.pageToken
* A previously-returned page token representing part of the larger set of
* results to view.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listAnywhereCachesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listAnywhereCachesStream(request, options) {
return this.storageControlInternal.listAnywhereCachesStream(request, options);
}
/**
* Equivalent to `listAnywhereCaches`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The bucket to which this cache belongs.
* @param {number} request.pageSize
* Maximum number of caches to return in a single response.
* The service will use this parameter or 1,000 items, whichever is smaller.
* @param {string} request.pageToken
* A previously-returned page token representing part of the larger set of
* results to view.
* @param {string} [request.requestId]
* Optional. A unique identifier for this request. UUID is the recommended
* format, but other formats are still accepted.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.list_anywhere_caches.js</caption>
* region_tag:storage_v2_generated_StorageControl_ListAnywhereCaches_async
*/
listAnywhereCachesAsync(request, options) {
return this.storageControlInternal.listAnywhereCachesAsync(request, options);
}
/**
* Lists the `IntelligenceFinding` resources for the specified project.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent of the `IntelligenceFinding` resource.
*
* Format: `projects/{project}/locations/{location}`
* @param {string} [request.filter]
* Optional. The filter expression to be applied.
* Supports filtering by `type` and `associated_resources`.
* @param {number} [request.pageSize]
* Optional. The maximum number of `IntelligenceFinding` resources to return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListIntelligenceFindings`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to
* `ListIntelligenceFindings` must match the call that provided the page
* token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.control.v2.IntelligenceFinding|IntelligenceFinding}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listIntelligenceFindingsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listIntelligenceFindings(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.listIntelligenceFindings(request, options);
}
return this.storageControlInternal.listIntelligenceFindings(request, options, callback);
}
/**
* Equivalent to `listIntelligenceFindings`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent of the `IntelligenceFinding` resource.
*
* Format: `projects/{project}/locations/{location}`
* @param {string} [request.filter]
* Optional. The filter expression to be applied.
* Supports filtering by `type` and `associated_resources`.
* @param {number} [request.pageSize]
* Optional. The maximum number of `IntelligenceFinding` resources to return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListIntelligenceFindings`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to
* `ListIntelligenceFindings` must match the call that provided the page
* token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.control.v2.IntelligenceFinding|IntelligenceFinding} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listIntelligenceFindingsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listIntelligenceFindingsStream(request, options) {
return this.storageControlInternal.listIntelligenceFindingsStream(request, options);
}
/**
* Equivalent to `listIntelligenceFindings`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent of the `IntelligenceFinding` resource.
*
* Format: `projects/{project}/locations/{location}`
* @param {string} [request.filter]
* Optional. The filter expression to be applied.
* Supports filtering by `type` and `associated_resources`.
* @param {number} [request.pageSize]
* Optional. The maximum number of `IntelligenceFinding` resources to return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListIntelligenceFindings`
* call. Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to
* `ListIntelligenceFindings` must match the call that provided the page
* token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.control.v2.IntelligenceFinding|IntelligenceFinding}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.list_intelligence_findings.js</caption>
* region_tag:storage_v2_generated_StorageControl_ListIntelligenceFindings_async
*/
listIntelligenceFindingsAsync(request, options) {
return this.storageControlInternal.listIntelligenceFindingsAsync(request, options);
}
/**
* Summarize the intelligence findings for the specified scope(org, folder or
* project).
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The scope to summarize the findings for.
* Format:
* - `organizations/{organization}/locations/{location}`
* - `folders/{folder}/locations/{location}`
* - `projects/{project}/locations/{location}`
* @param {google.storage.control.v2.SummarizeIntelligenceFindingsRequest.ResourceScope} [request.resourceScope]
* Optional. Determines the granularity of the findings
* when the `parent` is an organization or folder.
*
* - `PARENT` (or not set): A single summary is
* returned for each insight type, aggregated across the entire `parent`
* scope.
* - `PROJECT`: A separate summary is returned for each
* insight type for every project within the `parent` scope.
*
* The only supported values are `PARENT` and `PROJECT`.
* If no value is specified, the API behaviour defaults to the `PARENT`.
* @param {string} [request.filter]
* Optional. The filter expression, following AIP-160.
* Supports filtering by FindingType.
* @param {number} [request.pageSize]
* Optional. The maximum number of findings to return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous
* `SummarizeIntelligenceFindings` call. Provide this to retrieve the
* subsequent page.
*
* When paginating, all other parameters provided to
* `SummarizeIntelligenceFindings` must match the call that provided the page
* token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.control.v2.FindingSummary|FindingSummary}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `summarizeIntelligenceFindingsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
summarizeIntelligenceFindings(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.summarizeIntelligenceFindings(request, options);
}
return this.storageControlInternal.summarizeIntelligenceFindings(request, options, callback);
}
/**
* Equivalent to `summarizeIntelligenceFindings`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The scope to summarize the findings for.
* Format:
* - `organizations/{organization}/locations/{location}`
* - `folders/{folder}/locations/{location}`
* - `projects/{project}/locations/{location}`
* @param {google.storage.control.v2.SummarizeIntelligenceFindingsRequest.ResourceScope} [request.resourceScope]
* Optional. Determines the granularity of the findings
* when the `parent` is an organization or folder.
*
* - `PARENT` (or not set): A single summary is
* returned for each insight type, aggregated across the entire `parent`
* scope.
* - `PROJECT`: A separate summary is returned for each
* insight type for every project within the `parent` scope.
*
* The only supported values are `PARENT` and `PROJECT`.
* If no value is specified, the API behaviour defaults to the `PARENT`.
* @param {string} [request.filter]
* Optional. The filter expression, following AIP-160.
* Supports filtering by FindingType.
* @param {number} [request.pageSize]
* Optional. The maximum number of findings to return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous
* `SummarizeIntelligenceFindings` call. Provide this to retrieve the
* subsequent page.
*
* When paginating, all other parameters provided to
* `SummarizeIntelligenceFindings` must match the call that provided the page
* token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.control.v2.FindingSummary|FindingSummary} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `summarizeIntelligenceFindingsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
summarizeIntelligenceFindingsStream(request, options) {
return this.storageControlInternal.summarizeIntelligenceFindingsStream(request, options);
}
/**
* Equivalent to `summarizeIntelligenceFindings`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The scope to summarize the findings for.
* Format:
* - `organizations/{organization}/locations/{location}`
* - `folders/{folder}/locations/{location}`
* - `projects/{project}/locations/{location}`
* @param {google.storage.control.v2.SummarizeIntelligenceFindingsRequest.ResourceScope} [request.resourceScope]
* Optional. Determines the granularity of the findings
* when the `parent` is an organization or folder.
*
* - `PARENT` (or not set): A single summary is
* returned for each insight type, aggregated across the entire `parent`
* scope.
* - `PROJECT`: A separate summary is returned for each
* insight type for every project within the `parent` scope.
*
* The only supported values are `PARENT` and `PROJECT`.
* If no value is specified, the API behaviour defaults to the `PARENT`.
* @param {string} [request.filter]
* Optional. The filter expression, following AIP-160.
* Supports filtering by FindingType.
* @param {number} [request.pageSize]
* Optional. The maximum number of findings to return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous
* `SummarizeIntelligenceFindings` call. Provide this to retrieve the
* subsequent page.
*
* When paginating, all other parameters provided to
* `SummarizeIntelligenceFindings` must match the call that provided the page
* token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.control.v2.FindingSummary|FindingSummary}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.summarize_intelligence_findings.js</caption>
* region_tag:storage_v2_generated_StorageControl_SummarizeIntelligenceFindings_async
*/
summarizeIntelligenceFindingsAsync(request, options) {
return this.storageControlInternal.summarizeIntelligenceFindingsAsync(request, options);
}
/**
* Lists all the revisions of an `IntelligenceFinding` resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent of the `IntelligenceFindingRevision` resource.
* ## Format:
*
* `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}`
* @param {number} [request.pageSize]
* Optional. The maximum number of `IntelligenceFindingRevision` resources to
* return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous
* `ListIntelligenceFindingRevisions` call. Provide this to retrieve the
* subsequent page.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.control.v2.IntelligenceFindingRevision|IntelligenceFindingRevision}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listIntelligenceFindingRevisionsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listIntelligenceFindingRevisions(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.listIntelligenceFindingRevisions(request, options);
}
return this.storageControlInternal.listIntelligenceFindingRevisions(request, options, callback);
}
/**
* Equivalent to `listIntelligenceFindingRevisions`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent of the `IntelligenceFindingRevision` resource.
* ## Format:
*
* `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}`
* @param {number} [request.pageSize]
* Optional. The maximum number of `IntelligenceFindingRevision` resources to
* return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous
* `ListIntelligenceFindingRevisions` call. Provide this to retrieve the
* subsequent page.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.control.v2.IntelligenceFindingRevision|IntelligenceFindingRevision} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listIntelligenceFindingRevisionsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listIntelligenceFindingRevisionsStream(request, options) {
return this.storageControlInternal.listIntelligenceFindingRevisionsStream(request, options);
}
/**
* Equivalent to `listIntelligenceFindingRevisions`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent of the `IntelligenceFindingRevision` resource.
* ## Format:
*
* `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}`
* @param {number} [request.pageSize]
* Optional. The maximum number of `IntelligenceFindingRevision` resources to
* return.
*
* The maximum value is `100`; values above `100` will be coerced to `100`.
* The default value is `100`.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous
* `ListIntelligenceFindingRevisions` call. Provide this to retrieve the
* subsequent page.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.control.v2.IntelligenceFindingRevision|IntelligenceFindingRevision}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage_control.list_intelligence_finding_revisions.js</caption>
* region_tag:storage_v2_generated_StorageControl_ListIntelligenceFindingRevisions_async
*/
listIntelligenceFindingRevisionsAsync(request, options) {
return this.storageControlInternal.listIntelligenceFindingRevisionsAsync(request, options);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
* for the details.
* @param {function(?Error, ?Object)=} callback
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is an object representing
* {@link google.longrunning.Operation | google.longrunning.Operation}.
* @return {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* {@link google.longrunning.Operation | google.longrunning.Operation}.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* const name = '';
* const [response] = await client.getOperation({name});
* // doThingsWith(response)
* ```
*/
getOperation(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.getOperation(request, options);
}
return this.storageControlInternal.getOperation(request, options, callback);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
*
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation collection.
* @param {string} request.filter - The standard list filter.
* @param {number=} request.pageSize -
* The maximum number of resources contained in the underlying API
* response. If page streaming is performed per-resource, this
* parameter does not affect the return value. If page streaming is
* performed per-page, this determines the maximum number of
* resources in a page.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
* details.
* @returns {Object}
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
*
* @example
* ```
* const client = longrunning.operationsClient();
* for await (const response of client.listOperationsAsync(request));
* // doThingsWith(response)
* ```
*/
listOperationsAsync(request, options) {
return this.storageControlInternal.listOperationsAsync(request, options);
}
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not
* guaranteed. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* {@link Operations.GetOperation} or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation,
* the operation is not deleted; instead, it becomes an operation with
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
* 1, corresponding to `Code.CANCELLED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be cancelled.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
* details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.cancelOperation({name: ''});
* ```
*/
cancelOperation(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.cancelOperation(request, options);
}
return this.storageControlInternal.cancelOperation(request, options, callback);
}
/**
* Deletes a long-running operation. This method indicates that the client is
* no longer interested in the operation result. It does not cancel the
* operation. If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`.
*
* @param {Object} request - The request object that will be sent.
* @param {string} request.name - The name of the operation resource to be deleted.
* @param {Object=} options
* Optional parameters. You can override the default settings for this call,
* e.g, timeout, retries, paginations, etc. See {@link
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
* for the details.
* @param {function(?Error)=} callback
* The function which will be called with the result of the API call.
* @return {Promise} - The promise which resolves when API call finishes.
* The promise has a method named "cancel" which cancels the ongoing API
* call.
*
* @example
* ```
* const client = longrunning.operationsClient();
* await client.deleteOperation({name: ''});
* ```
*/
deleteOperation(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageControlInternal.deleteOperation(request, options);
}
return this.storageControlInternal.deleteOperation(request, options, callback);
}
// --------------------
// -- Path templates --
// --------------------
/**
* Return a fully-qualified anywhereCache resource name string.
*
* @param {string} project
* @param {string} bucket
* @param {string} anywhere_cache
* @returns {string} Resource name string.
*/
anywhereCachePath(project, bucket, anywhereCache) {
return this.storageControlInternal.anywhereCachePath(project, bucket, anywhereCache);
}
/**
* Parse the project from AnywhereCache resource.
*
* @param {string} anywhereCacheName
* A fully-qualified path representing AnywhereCache resource.
* @returns {string} A string representing the project.
*/
matchProjectFromAnywhereCacheName(anywhereCacheName) {
return this.storageControlInternal.matchProjectFromAnywhereCacheName(anywhereCacheName);
}
/**
* Parse the bucket from AnywhereCache resource.
*
* @param {string} anywhereCacheName
* A fully-qualified path representing AnywhereCache resource.
* @returns {string} A string representing the bucket.
*/
matchBucketFromAnywhereCacheName(anywhereCacheName) {
return this.storageControlInternal.matchBucketFromAnywhereCacheName(anywhereCacheName);
}
/**
* Parse the anywhere_cache from AnywhereCache resource.
*
* @param {string} anywhereCacheName
* A fully-qualified path representing AnywhereCache resource.
* @returns {string} A string representing the anywhere_cache.
*/
matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName) {
return this.storageControlInternal.matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName);
}
/**
* Return a fully-qualified bucket resource name string.
*
* @param {string} project
* @param {string} bucket
* @returns {string} Resource name string.
*/
bucketPath(project, bucket) {
return this.storageControlInternal.bucketPath(project, bucket);
}
/**
* Parse the project from Bucket resource.
*
* @param {string} bucketName
* A fully-qualified path representing Bucket resource.
* @returns {string} A string representing the project.
*/
matchProjectFromBucketName(bucketName) {
return this.storageControlInternal.matchProjectFromBucketName(bucketName);
}
/**
* Parse the bucket from Bucket resource.
*
* @param {string} bucketName
* A fully-qualified path representing Bucket resource.
* @returns {string} A string representing the bucket.
*/
matchBucketFromBucketName(bucketName) {
return this.storageControlInternal.matchBucketFromBucketName(bucketName);
}
/**
* Return a fully-qualified folder resource name string.
*
* @param {string} project
* @param {string} bucket
* @param {string} folder
* @returns {string} Resource name string.
*/
folderPath(project, bucket, folder) {
return this.storageControlInternal.folderPath(project, bucket, folder);
}
/**
* Parse the project from Folder resource.
*
* @param {string} folderName
* A fully-qualified path representing Folder resource.
* @returns {string} A string representing the project.
*/
matchProjectFromFolderName(folderName) {
return this.storageControlInternal.matchProjectFromFolderName(folderName);
}
/**
* Parse the bucket from Folder resource.
*
* @param {string} folderName
* A fully-qualified path representing Folder resource.
* @returns {string} A string representing the bucket.
*/
matchBucketFromFolderName(folderName) {
return this.storageControlInternal.matchBucketFromFolderName(folderName);
}
/**
* Parse the folder from Folder resource.
*
* @param {string} folderName
* A fully-qualified path representing Folder resource.
* @returns {string} A string representing the folder.
*/
matchFolderFromFolderName(folderName) {
return this.storageControlInternal.matchFolderFromFolderName(folderName);
}
/**
* Return a fully-qualified folderLocationIntelligenceConfig resource name string.
*
* @param {string} folder
* @param {string} location
* @returns {string} Resource name string.
*/
folderLocationIntelligenceConfigPath(folder, location) {
return this.storageControlInternal.folderLocationIntelligenceConfigPath(folder, location);
}
/**
* Parse the folder from FolderLocationIntelligenceConfig resource.
*
* @param {string} folderLocationIntelligenceConfigName
* A fully-qualified path representing folder_location_intelligenceConfig resource.
* @returns {string} A string representing the folder.
*/
matchFolderFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName) {
return this.storageControlInternal.matchFolderFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName);
}
/**
* Parse the location from FolderLocationIntelligenceConfig resource.
*
* @param {string} folderLocationIntelligenceConfigName
* A fully-qualified path representing folder_location_intelligenceConfig resource.
* @returns {string} A string representing the location.
*/
matchLocationFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName) {
return this.storageControlInternal.matchLocationFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName);
}
/**
* Return a fully-qualified intelligenceFinding resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} intelligence_finding
* @returns {string} Resource name string.
*/
intelligenceFindingPath(project, location, intelligenceFinding) {
return this.storageControlInternal.intelligenceFindingPath(project, location, intelligenceFinding);
}
/**
* Parse the project from IntelligenceFinding resource.
*
* @param {string} intelligenceFindingName
* A fully-qualified path representing IntelligenceFinding resource.
* @returns {string} A string representing the project.
*/
matchProjectFromIntelligenceFindingName(intelligenceFindingName) {
return this.storageControlInternal.matchProjectFromIntelligenceFindingName(intelligenceFindingName);
}
/**
* Parse the location from IntelligenceFinding resource.
*
* @param {string} intelligenceFindingName
* A fully-qualified path representing IntelligenceFinding resource.
* @returns {string} A string representing the location.
*/
matchLocationFromIntelligenceFindingName(intelligenceFindingName) {
return this.storageControlInternal.matchLocationFromIntelligenceFindingName(intelligenceFindingName);
}
/**
* Parse the intelligence_finding from IntelligenceFinding resource.
*
* @param {string} intelligenceFindingName
* A fully-qualified path representing IntelligenceFinding resource.
* @returns {string} A string representing the intelligence_finding.
*/
matchIntelligenceFindingFromIntelligenceFindingName(intelligenceFindingName) {
return this.storageControlInternal.matchIntelligenceFindingFromIntelligenceFindingName(intelligenceFindingName);
}
/**
* Return a fully-qualified intelligenceFindingRevision resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} intelligence_finding
* @param {string} revision
* @returns {string} Resource name string.
*/
intelligenceFindingRevisionPath(project, location, intelligenceFinding, revision) {
return this.storageControlInternal.intelligenceFindingRevisionPath(project, location, intelligenceFinding, revision);
}
/**
* Parse the project from IntelligenceFindingRevision resource.
*
* @param {string} intelligenceFindingRevisionName
* A fully-qualified path representing IntelligenceFindingRevision resource.
* @returns {string} A string representing the project.
*/
matchProjectFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName) {
return this.storageControlInternal.matchProjectFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName);
}
/**
* Parse the location from IntelligenceFindingRevision resource.
*
* @param {string} intelligenceFindingRevisionName
* A fully-qualified path representing IntelligenceFindingRevision resource.
* @returns {string} A string representing the location.
*/
matchLocationFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName) {
return this.storageControlInternal.matchLocationFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName);
}
/**
* Parse the intelligence_finding from IntelligenceFindingRevision resource.
*
* @param {string} intelligenceFindingRevisionName
* A fully-qualified path representing IntelligenceFindingRevision resource.
* @returns {string} A string representing the intelligence_finding.
*/
matchIntelligenceFindingFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName) {
return this.storageControlInternal.matchIntelligenceFindingFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName);
}
/**
* Parse the revision from IntelligenceFindingRevision resource.
*
* @param {string} intelligenceFindingRevisionName
* A fully-qualified path representing IntelligenceFindingRevision resource.
* @returns {string} A string representing the revision.
*/
matchRevisionFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName) {
return this.storageControlInternal.matchRevisionFromIntelligenceFindingRevisionName(intelligenceFindingRevisionName);
}
/**
* Return a fully-qualified location resource name string.
*
* @param {string} project
* @param {string} location
* @returns {string} Resource name string.
*/
locationPath(project, location) {
return this.storageControlInternal.locationPath(project, location);
}
/**
* Parse the project from Location resource.
*
* @param {string} locationName
* A fully-qualified path representing Location resource.
* @returns {string} A string representing the project.
*/
matchProjectFromLocationName(locationName) {
return this.storageControlInternal.matchProjectFromLocationName(locationName);
}
/**
* Parse the location from Location resource.
*
* @param {string} locationName
* A fully-qualified path representing Location resource.
* @returns {string} A string representing the location.
*/
matchLocationFromLocationName(locationName) {
return this.storageControlInternal.matchLocationFromLocationName(locationName);
}
/**
* Return a fully-qualified managedFolder resource name string.
*
* @param {string} project
* @param {string} bucket
* @param {string} managed_folder
* @returns {string} Resource name string.
*/
managedFolderPath(project, bucket, managedFolder) {
return this.storageControlInternal.managedFolderPath(project, bucket, managedFolder);
}
/**
* Parse the project from ManagedFolder resource.
*
* @param {string} managedFolderName
* A fully-qualified path representing ManagedFolder resource.
* @returns {string} A string representing the project.
*/
matchProjectFromManagedFolderName(managedFolderName) {
return this.storageControlInternal.matchProjectFromManagedFolderName(managedFolderName);
}
/**
* Parse the bucket from ManagedFolder resource.
*
* @param {string} managedFolderName
* A fully-qualified path representing ManagedFolder resource.
* @returns {string} A string representing the bucket.
*/
matchBucketFromManagedFolderName(managedFolderName) {
return this.storageControlInternal.matchBucketFromManagedFolderName(managedFolderName);
}
/**
* Parse the managed_folder from ManagedFolder resource.
*
* @param {string} managedFolderName
* A fully-qualified path representing ManagedFolder resource.
* @returns {string} A string representing the managed_folder.
*/
matchManagedFolderFromManagedFolderName(managedFolderName) {
return this.storageControlInternal.matchManagedFolderFromManagedFolderName(managedFolderName);
}
/**
* Return a fully-qualified orgLocationIntelligenceConfig resource name string.
*
* @param {string} org
* @param {string} location
* @returns {string} Resource name string.
*/
orgLocationIntelligenceConfigPath(org, location) {
return this.storageControlInternal.orgLocationIntelligenceConfigPath(org, location);
}
/**
* Parse the org from OrgLocationIntelligenceConfig resource.
*
* @param {string} orgLocationIntelligenceConfigName
* A fully-qualified path representing org_location_intelligenceConfig resource.
* @returns {string} A string representing the org.
*/
matchOrgFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName) {
return this.storageControlInternal.matchOrgFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName);
}
/**
* Parse the location from OrgLocationIntelligenceConfig resource.
*
* @param {string} orgLocationIntelligenceConfigName
* A fully-qualified path representing org_location_intelligenceConfig resource.
* @returns {string} A string representing the location.
*/
matchLocationFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName) {
return this.storageControlInternal.matchLocationFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName);
}
/**
* Return a fully-qualified project resource name string.
*
* @param {string} project
* @returns {string} Resource name string.
*/
projectPath(project) {
return this.storageControlInternal.projectPath(project);
}
/**
* Parse the project from Project resource.
*
* @param {string} projectName
* A fully-qualified path representing Project resource.
* @returns {string} A string representing the project.
*/
matchProjectFromProjectName(projectName) {
return this.storageControlInternal.matchProjectFromProjectName(projectName);
}
/**
* Return a fully-qualified projectLocationIntelligenceConfig resource name string.
*
* @param {string} project
* @param {string} location
* @returns {string} Resource name string.
*/
projectLocationIntelligenceConfigPath(project, location) {
return this.storageControlInternal.projectLocationIntelligenceConfigPath(project, location);
}
/**
* Parse the project from ProjectLocationIntelligenceConfig resource.
*
* @param {string} projectLocationIntelligenceConfigName
* A fully-qualified path representing project_location_intelligenceConfig resource.
* @returns {string} A string representing the project.
*/
matchProjectFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName) {
return this.storageControlInternal.matchProjectFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName);
}
/**
* Parse the location from ProjectLocationIntelligenceConfig resource.
*
* @param {string} projectLocationIntelligenceConfigName
* A fully-qualified path representing project_location_intelligenceConfig resource.
* @returns {string} A string representing the location.
*/
matchLocationFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName) {
return this.storageControlInternal.matchLocationFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName);
}
/**
* Return a fully-qualified storageLayout resource name string.
*
* @param {string} project
* @param {string} bucket
* @returns {string} Resource name string.
*/
storageLayoutPath(project, bucket) {
return this.storageControlInternal.storageLayoutPath(project, bucket);
}
/**
* Parse the project from StorageLayout resource.
*
* @param {string} storageLayoutName
* A fully-qualified path representing StorageLayout resource.
* @returns {string} A string representing the project.
*/
matchProjectFromStorageLayoutName(storageLayoutName) {
return this.storageControlInternal.matchProjectFromStorageLayoutName(storageLayoutName);
}
/**
* Parse the bucket from StorageLayout resource.
*
* @param {string} storageLayoutName
* A fully-qualified path representing StorageLayout resource.
* @returns {string} A string representing the bucket.
*/
matchBucketFromStorageLayoutName(storageLayoutName) {
return this.storageControlInternal.matchBucketFromStorageLayoutName(storageLayoutName);
}
/**
* Terminate the gRPC channel and close the client.
*
* The client will no longer be usable and all future behavior is undefined.
* @returns {Promise} A promise that resolves when the client is closed.
*/
close() {
return Promise.all([
this.storageControlInternal.close(),
this.storageClient.close(),
]).then(() => { });
}
// -------------------
// -- Service calls --
// -------------------
/**
* Permanently deletes an empty bucket.
* The request fails if there are any live or
* noncurrent objects in the bucket, but the request succeeds if the
* bucket only contains soft-deleted objects or incomplete uploads, such
* as ongoing XML API multipart uploads. Does not permanently delete
* soft-deleted objects.
*
* When this API is used to delete a bucket containing an object that has a
* soft delete policy
* enabled, the object becomes soft deleted, and the
* `softDeleteTime` and `hardDeleteTime` properties are set on the
* object.
*
* Objects and multipart uploads that were in the bucket at the time of
* deletion are also retained for the specified retention duration. When
* a soft-deleted bucket reaches the end of its retention duration, it
* is permanently deleted. The `hardDeleteTime` of the bucket always
* equals
* or exceeds the expiration time of the last soft-deleted object in the
* bucket.
*
* **IAM Permissions**:
*
* Requires `storage.buckets.delete` IAM permission on the bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of a bucket to delete.
* @param {number} request.ifMetagenerationMatch
* If set, only deletes the bucket if its metageneration matches this value.
* @param {number} request.ifMetagenerationNotMatch
* If set, only deletes the bucket if its metageneration does not match this
* value.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage.delete_bucket.js</caption>
* region_tag:storage_v2_generated_Storage_DeleteBucket_async
*/
deleteBucket(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageClient.deleteBucket(request, options);
}
return this.storageClient.deleteBucket(request, options, callback);
}
/**
* Returns metadata for the specified bucket.
*
* **IAM Permissions**:
*
* Requires `storage.buckets.get`
* IAM permission on
* the bucket. Additionally, to return specific bucket metadata, the
* authenticated user must have the following permissions:
*
* - To return the IAM policies: `storage.buckets.getIamPolicy`
* - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of a bucket.
* @param {number} request.ifMetagenerationMatch
* If set, only gets the bucket metadata if its metageneration matches this
* value.
* @param {number} request.ifMetagenerationNotMatch
* If set, and if the bucket's current metageneration matches the specified
* value, the request returns an error.
* @param {google.protobuf.FieldMask} request.readMask
* Mask specifying which fields to read.
* A `*` field might be used to indicate all fields.
* If no mask is specified, it defaults to all fields.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage.get_bucket.js</caption>
* region_tag:storage_v2_generated_Storage_GetBucket_async
*/
getBucket(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageClient.getBucket(request, options);
}
return this.storageClient.getBucket(request, options, callback);
}
/**
* Creates a new bucket.
*
* **IAM Permissions**:
*
* Requires `storage.buckets.create` IAM permission on the bucket.
* Additionally, to enable specific bucket features, the authenticated user
* must have the following permissions:
*
* - To enable object retention using the `enableObjectRetention` query
* parameter: `storage.buckets.enableObjectRetention`
* - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The project to which this bucket belongs. This field must either
* be empty or `projects/_`. The project ID that owns this bucket should be
* specified in the `bucket.project` field.
* @param {google.storage.v2.Bucket} [request.bucket]
* Optional. Properties of the new bucket being inserted.
* The name of the bucket is specified in the `bucket_id` field. Populating
* `bucket.name` field results in an error.
* The project of the bucket must be specified in the `bucket.project` field.
* This field must be in `projects/{projectIdentifier}` format,
* {projectIdentifier} can be the project ID or project number. The `parent`
* field must be either empty or `projects/_`.
* @param {string} request.bucketId
* Required. The ID to use for this bucket, which becomes the final component
* of the bucket's resource name. For example, the value `foo` might result in
* a bucket with the name `projects/123456/buckets/foo`.
* @param {string} [request.predefinedAcl]
* Optional. Apply a predefined set of access controls to this bucket.
* Valid values are `authenticatedRead`, `private`, `projectPrivate`,
* `publicRead`, or `publicReadWrite`.
* @param {string} [request.predefinedDefaultObjectAcl]
* Optional. Apply a predefined set of default object access controls to this
* bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
* `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
* @param {boolean} [request.enableObjectRetention]
* Optional. If true, enable object retention on the bucket.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage.create_bucket.js</caption>
* region_tag:storage_v2_generated_Storage_CreateBucket_async
*/
createBucket(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageClient.createBucket(request, options);
}
return this.storageClient.createBucket(request, options, callback);
}
/**
* Permanently locks the retention
* policy that is
* currently applied to the specified bucket.
*
* Caution: Locking a bucket is an
* irreversible action. Once you lock a bucket:
*
* - You cannot remove the retention policy from the bucket.
* - You cannot decrease the retention period for the policy.
*
* Once locked, you must delete the entire bucket in order to remove the
* bucket's retention policy. However, before you can delete the bucket, you
* must delete all the objects in the bucket, which is only
* possible if all the objects have reached the retention period set by the
* retention policy.
*
* **IAM Permissions**:
*
* Requires `storage.buckets.update` IAM permission on the bucket.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.bucket
* Required. Name of a bucket.
* @param {number} request.ifMetagenerationMatch
* Required. Makes the operation conditional on whether bucket's current
* metageneration matches the given value. Must be positive.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage.lock_bucket_retention_policy.js</caption>
* region_tag:storage_v2_generated_Storage_LockBucketRetentionPolicy_async
*/
lockBucketRetentionPolicy(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageClient.lockBucketRetentionPolicy(request, options);
}
return this.storageClient.lockBucketRetentionPolicy(request, options, callback);
}
/**
* Updates a bucket. Changes to the bucket are readable immediately after
* writing, but configuration changes might take time to propagate. This
* method supports `patch` semantics.
*
* **IAM Permissions**:
*
* Requires `storage.buckets.update` IAM permission on the bucket.
* Additionally, to enable specific bucket features, the authenticated user
* must have the following permissions:
*
* - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
* - To update public access prevention policies or access control lists
* (ACLs): `storage.buckets.setIamPolicy`
*
* @param {Object} request
* The request object that will be sent.
* @param {google.storage.v2.Bucket} request.bucket
* Required. The bucket to update.
* The bucket's `name` field is used to identify the bucket.
* @param {number} request.ifMetagenerationMatch
* If set, the request modifies the bucket if its metageneration matches this
* value.
* @param {number} request.ifMetagenerationNotMatch
* If set, the request modifies the bucket if its metageneration doesn't
* match this value.
* @param {string} [request.predefinedAcl]
* Optional. Apply a predefined set of access controls to this bucket.
* Valid values are `authenticatedRead`, `private`, `projectPrivate`,
* `publicRead`, or `publicReadWrite`.
* @param {string} [request.predefinedDefaultObjectAcl]
* Optional. Apply a predefined set of default object access controls to this
* bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
* `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
* @param {google.protobuf.FieldMask} request.updateMask
* Required. List of fields to be updated.
*
* To specify ALL fields, equivalent to the JSON API's "update" function,
* specify a single field with the value `*`. Note: not recommended. If a new
* field is introduced at a later time, an older client updating with the `*`
* might accidentally reset the new field's value.
*
* Not specifying any fields is an error.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage.update_bucket.js</caption>
* region_tag:storage_v2_generated_Storage_UpdateBucket_async
*/
updateBucket(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageClient.updateBucket(request, options);
}
return this.storageClient.updateBucket(request, options, callback);
}
/**
* Retrieves a list of buckets for a given project, ordered
* lexicographically by name.
*
* **IAM Permissions**:
*
* Requires `storage.buckets.list` IAM permission on the bucket.
* Additionally, to enable specific bucket features, the authenticated
* user must have the following permissions:
*
* - To list the IAM policies: `storage.buckets.getIamPolicy`
* - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The project whose buckets we are listing.
* @param {number} [request.pageSize]
* Optional. Maximum number of buckets to return in a single response. The
* service uses this parameter or `1,000` items, whichever is smaller. If
* `acl` is present in the `read_mask`, the service uses this parameter of
* `200` items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to buckets whose names begin with this prefix.
* @param {google.protobuf.FieldMask} request.readMask
* Mask specifying which fields to read from each result.
* If no mask is specified, it defaults to all fields except `items.
* owner`, `items.acl`, and `items.default_object_acl`.
* `*` might be used to mean "all fields".
* @param {boolean} [request.returnPartialSuccess]
* Optional. Allows listing of buckets, even if there are buckets that are
* unreachable.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.storage.v2.Bucket|Bucket}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listBucketsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listBuckets(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
if (callback === undefined) {
return this.storageClient.listBuckets(request, options);
}
return this.storageClient.listBuckets(request, options, callback);
}
/**
* Equivalent to `listBuckets`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The project whose buckets we are listing.
* @param {number} [request.pageSize]
* Optional. Maximum number of buckets to return in a single response. The
* service uses this parameter or `1,000` items, whichever is smaller. If
* `acl` is present in the `read_mask`, the service uses this parameter of
* `200` items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to buckets whose names begin with this prefix.
* @param {google.protobuf.FieldMask} request.readMask
* Mask specifying which fields to read from each result.
* If no mask is specified, it defaults to all fields except `items.
* owner`, `items.acl`, and `items.default_object_acl`.
* `*` might be used to mean "all fields".
* @param {boolean} [request.returnPartialSuccess]
* Optional. Allows listing of buckets, even if there are buckets that are
* unreachable.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.storage.v2.Bucket|Bucket} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listBucketsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listBucketsStream(request, options) {
return this.storageClient.listBucketsStream(request, options);
}
/**
* Equivalent to `listBuckets`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The project whose buckets we are listing.
* @param {number} [request.pageSize]
* Optional. Maximum number of buckets to return in a single response. The
* service uses this parameter or `1,000` items, whichever is smaller. If
* `acl` is present in the `read_mask`, the service uses this parameter of
* `200` items, whichever is smaller.
* @param {string} [request.pageToken]
* Optional. A previously-returned page token representing part of the larger
* set of results to view.
* @param {string} [request.prefix]
* Optional. Filter results to buckets whose names begin with this prefix.
* @param {google.protobuf.FieldMask} request.readMask
* Mask specifying which fields to read from each result.
* If no mask is specified, it defaults to all fields except `items.
* owner`, `items.acl`, and `items.default_object_acl`.
* `*` might be used to mean "all fields".
* @param {boolean} [request.returnPartialSuccess]
* Optional. Allows listing of buckets, even if there are buckets that are
* unreachable.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.storage.v2.Bucket|Bucket}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/storage.list_buckets.js</caption>
* region_tag:storage_v2_generated_Storage_ListBuckets_async
*/
listBucketsAsync(request, options) {
return this.storageClient.listBucketsAsync(request, options);
}
/**
* Return a fully-qualified cryptoKey resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} key_ring
* @param {string} crypto_key
* @returns {string} Resource name string.
*/
cryptoKeyPath(project, location, keyRing, cryptoKey) {
return this.storageClient.cryptoKeyPath(project, location, keyRing, cryptoKey);
}
/**
* Parse the project from CryptoKey resource.
*
* @param {string} cryptoKeyName
* A fully-qualified path representing CryptoKey resource.
* @returns {string} A string representing the project.
*/
matchProjectFromCryptoKeyName(cryptoKeyName) {
return this.storageClient.matchProjectFromCryptoKeyName(cryptoKeyName);
}
/**
* Parse the location from CryptoKey resource.
*
* @param {string} cryptoKeyName
* A fully-qualified path representing CryptoKey resource.
* @returns {string} A string representing the location.
*/
matchLocationFromCryptoKeyName(cryptoKeyName) {
return this.storageClient.matchLocationFromCryptoKeyName(cryptoKeyName);
}
/**
* Parse the key_ring from CryptoKey resource.
*
* @param {string} cryptoKeyName
* A fully-qualified path representing CryptoKey resource.
* @returns {string} A string representing the key_ring.
*/
matchKeyRingFromCryptoKeyName(cryptoKeyName) {
return this.storageClient.matchKeyRingFromCryptoKeyName(cryptoKeyName);
}
/**
* Parse the crypto_key from CryptoKey resource.
*
* @param {string} cryptoKeyName
* A fully-qualified path representing CryptoKey resource.
* @returns {string} A string representing the crypto_key.
*/
matchCryptoKeyFromCryptoKeyName(cryptoKeyName) {
return this.storageClient.matchCryptoKeyFromCryptoKeyName(cryptoKeyName);
}
}
exports.StorageControlClient = StorageControlClient;
//# sourceMappingURL=storage_control_client.js.map