// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * NetApp API Client for Deno * ========================== * * Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage service that provides advanced data management capabilities and highly scalable performance with global availability. * * Docs: https://cloud.google.com/netapp/ * Source: https://googleapis.deno.dev/v1/netapp:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage * service that provides advanced data management capabilities and highly * scalable performance with global availability. */ export class NetApp { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://netapp.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * CreateActiveDirectory Creates the active directory specified in the * request. * * @param parent Required. Value for parent. */ async projectsLocationsActiveDirectoriesCreate(parent: string, req: ActiveDirectory, opts: ProjectsLocationsActiveDirectoriesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/activeDirectories`); if (opts.activeDirectoryId !== undefined) { url.searchParams.append("activeDirectoryId", String(opts.activeDirectoryId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Delete the active directory specified in the request. * * @param name Required. Name of the active directory. */ async projectsLocationsActiveDirectoriesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Describes a specified active directory. * * @param name Required. Name of the active directory. */ async projectsLocationsActiveDirectoriesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ActiveDirectory; } /** * Lists active directories. * * @param parent Required. Parent value for ListActiveDirectoriesRequest */ async projectsLocationsActiveDirectoriesList(parent: string, opts: ProjectsLocationsActiveDirectoriesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/activeDirectories`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListActiveDirectoriesResponse; } /** * Update the parameters of an active directories. * * @param name Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. */ async projectsLocationsActiveDirectoriesPatch(name: string, req: ActiveDirectory, opts: ProjectsLocationsActiveDirectoriesPatchOptions = {}): Promise { opts = serializeProjectsLocationsActiveDirectoriesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Creates new backup policy * * @param parent Required. The location to create the backup policies of, in the format `projects/{project_id}/locations/{location}` */ async projectsLocationsBackupPoliciesCreate(parent: string, req: BackupPolicy, opts: ProjectsLocationsBackupPoliciesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupPolicies`); if (opts.backupPolicyId !== undefined) { url.searchParams.append("backupPolicyId", String(opts.backupPolicyId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Warning! This operation will permanently delete the backup policy. * * @param name Required. The backup policy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` */ async projectsLocationsBackupPoliciesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Returns the description of the specified backup policy by * backup_policy_id. * * @param name Required. The backupPolicy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` */ async projectsLocationsBackupPoliciesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as BackupPolicy; } /** * Returns list of all available backup policies. * * @param parent Required. Parent value for ListBackupPoliciesRequest */ async projectsLocationsBackupPoliciesList(parent: string, opts: ProjectsLocationsBackupPoliciesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupPolicies`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBackupPoliciesResponse; } /** * Updates settings of a specific backup policy. * * @param name Identifier. The resource name of the backup policy. Format: `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. */ async projectsLocationsBackupPoliciesPatch(name: string, req: BackupPolicy, opts: ProjectsLocationsBackupPoliciesPatchOptions = {}): Promise { opts = serializeProjectsLocationsBackupPoliciesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Creates a backup from the volume specified in the request The backup can * be created from the given snapshot if specified in the request. If no * snapshot specified, there'll be a new snapshot taken to initiate the backup * creation. * * @param parent Required. The NetApp backupVault to create the backups of, in the format `projects/*/locations/*/backupVaults/{backup_vault_id}` */ async projectsLocationsBackupVaultsBackupsCreate(parent: string, req: Backup, opts: ProjectsLocationsBackupVaultsBackupsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backups`); if (opts.backupId !== undefined) { url.searchParams.append("backupId", String(opts.backupId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Warning! This operation will permanently delete the backup. * * @param name Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` */ async projectsLocationsBackupVaultsBackupsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Returns the description of the specified backup * * @param name Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` */ async projectsLocationsBackupVaultsBackupsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Backup; } /** * Returns descriptions of all backups for a backupVault. * * @param parent Required. The backupVault for which to retrieve backup information, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve backup information for all locations, use "-" for the `{location}` value. To retrieve backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and specify volume full name with the filter. */ async projectsLocationsBackupVaultsBackupsList(parent: string, opts: ProjectsLocationsBackupVaultsBackupsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backups`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBackupsResponse; } /** * Update backup with full spec. * * @param name Identifier. The resource name of the backup. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. */ async projectsLocationsBackupVaultsBackupsPatch(name: string, req: Backup, opts: ProjectsLocationsBackupVaultsBackupsPatchOptions = {}): Promise { opts = serializeProjectsLocationsBackupVaultsBackupsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Creates new backup vault * * @param parent Required. The location to create the backup vaults, in the format `projects/{project_id}/locations/{location}` */ async projectsLocationsBackupVaultsCreate(parent: string, req: BackupVault, opts: ProjectsLocationsBackupVaultsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupVaults`); if (opts.backupVaultId !== undefined) { url.searchParams.append("backupVaultId", String(opts.backupVaultId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Warning! This operation will permanently delete the backup vault. * * @param name Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` */ async projectsLocationsBackupVaultsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Returns the description of the specified backup vault * * @param name Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` */ async projectsLocationsBackupVaultsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as BackupVault; } /** * Returns list of all available backup vaults. * * @param parent Required. The location for which to retrieve backupVault information, in the format `projects/{project_id}/locations/{location}`. */ async projectsLocationsBackupVaultsList(parent: string, opts: ProjectsLocationsBackupVaultsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backupVaults`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBackupVaultsResponse; } /** * Updates the settings of a specific backup vault. * * @param name Identifier. The resource name of the backup vault. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. */ async projectsLocationsBackupVaultsPatch(name: string, req: BackupVault, opts: ProjectsLocationsBackupVaultsPatchOptions = {}): Promise { opts = serializeProjectsLocationsBackupVaultsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Location; } /** * Creates a new KMS config. * * @param parent Required. Value for parent. */ async projectsLocationsKmsConfigsCreate(parent: string, req: KmsConfig, opts: ProjectsLocationsKmsConfigsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/kmsConfigs`); if (opts.kmsConfigId !== undefined) { url.searchParams.append("kmsConfigId", String(opts.kmsConfigId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Warning! This operation will permanently delete the Kms config. * * @param name Required. Name of the KmsConfig. */ async projectsLocationsKmsConfigsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Encrypt the existing volumes without CMEK encryption with the desired the * KMS config for the whole region. * * @param name Required. Name of the KmsConfig. */ async projectsLocationsKmsConfigsEncrypt(name: string, req: EncryptVolumesRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:encrypt`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Returns the description of the specified KMS config by kms_config_id. * * @param name Required. Name of the KmsConfig */ async projectsLocationsKmsConfigsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as KmsConfig; } /** * Returns descriptions of all KMS configs owned by the caller. * * @param parent Required. Parent value */ async projectsLocationsKmsConfigsList(parent: string, opts: ProjectsLocationsKmsConfigsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/kmsConfigs`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListKmsConfigsResponse; } /** * Updates the Kms config properties with the full spec * * @param name Identifier. Name of the KmsConfig. */ async projectsLocationsKmsConfigsPatch(name: string, req: KmsConfig, opts: ProjectsLocationsKmsConfigsPatchOptions = {}): Promise { opts = serializeProjectsLocationsKmsConfigsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Verifies KMS config reachability. * * @param name Required. Name of the KMS Config to be verified. */ async projectsLocationsKmsConfigsVerify(name: string, req: VerifyKmsConfigRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:verify`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as VerifyKmsConfigResponse; } /** * Lists information about the supported locations for this service. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/locations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListLocationsResponse; } /** * 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 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 * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleProtobufEmpty; } /** * 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 name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * 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 name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Creates a new storage pool. * * @param parent Required. Value for parent. */ async projectsLocationsStoragePoolsCreate(parent: string, req: StoragePool, opts: ProjectsLocationsStoragePoolsCreateOptions = {}): Promise { req = serializeStoragePool(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/storagePools`); if (opts.storagePoolId !== undefined) { url.searchParams.append("storagePoolId", String(opts.storagePoolId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Warning! This operation will permanently delete the storage pool. * * @param name Required. Name of the storage pool */ async projectsLocationsStoragePoolsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Returns the description of the specified storage pool by poolId. * * @param name Required. Name of the storage pool */ async projectsLocationsStoragePoolsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeStoragePool(data); } /** * Returns descriptions of all storage pools owned by the caller. * * @param parent Required. Parent value */ async projectsLocationsStoragePoolsList(parent: string, opts: ProjectsLocationsStoragePoolsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/storagePools`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListStoragePoolsResponse(data); } /** * Updates the storage pool properties with the full spec * * @param name Identifier. Name of the storage pool */ async projectsLocationsStoragePoolsPatch(name: string, req: StoragePool, opts: ProjectsLocationsStoragePoolsPatchOptions = {}): Promise { req = serializeStoragePool(req); opts = serializeProjectsLocationsStoragePoolsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * This operation will switch the active/replica zone for a regional * storagePool. * * @param name Required. Name of the storage pool */ async projectsLocationsStoragePoolsSwitch(name: string, req: SwitchActiveReplicaZoneRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:switch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Creates a new Volume in a given project and location. * * @param parent Required. Value for parent. */ async projectsLocationsVolumesCreate(parent: string, req: Volume, opts: ProjectsLocationsVolumesCreateOptions = {}): Promise { req = serializeVolume(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/volumes`); if (opts.volumeId !== undefined) { url.searchParams.append("volumeId", String(opts.volumeId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Volume. * * @param name Required. Name of the volume */ async projectsLocationsVolumesDelete(name: string, opts: ProjectsLocationsVolumesDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Volume. * * @param name Required. Name of the volume */ async projectsLocationsVolumesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeVolume(data); } /** * Lists Volumes in a given project. * * @param parent Required. Parent value for ListVolumesRequest */ async projectsLocationsVolumesList(parent: string, opts: ProjectsLocationsVolumesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/volumes`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListVolumesResponse(data); } /** * Updates the parameters of a single Volume. * * @param name Identifier. Name of the volume */ async projectsLocationsVolumesPatch(name: string, req: Volume, opts: ProjectsLocationsVolumesPatchOptions = {}): Promise { req = serializeVolume(req); opts = serializeProjectsLocationsVolumesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Creates a new quota rule. * * @param parent Required. Parent value for CreateQuotaRuleRequest */ async projectsLocationsVolumesQuotaRulesCreate(parent: string, req: QuotaRule, opts: ProjectsLocationsVolumesQuotaRulesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/quotaRules`); if (opts.quotaRuleId !== undefined) { url.searchParams.append("quotaRuleId", String(opts.quotaRuleId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a quota rule. * * @param name Required. Name of the quota rule. */ async projectsLocationsVolumesQuotaRulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Returns details of the specified quota rule. * * @param name Required. Name of the quota rule */ async projectsLocationsVolumesQuotaRulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as QuotaRule; } /** * Returns list of all quota rules in a location. * * @param parent Required. Parent value for ListQuotaRulesRequest */ async projectsLocationsVolumesQuotaRulesList(parent: string, opts: ProjectsLocationsVolumesQuotaRulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/quotaRules`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListQuotaRulesResponse; } /** * Updates a quota rule. * * @param name Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id}`. */ async projectsLocationsVolumesQuotaRulesPatch(name: string, req: QuotaRule, opts: ProjectsLocationsVolumesQuotaRulesPatchOptions = {}): Promise { opts = serializeProjectsLocationsVolumesQuotaRulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Create a new replication for a volume. * * @param parent Required. The NetApp volume to create the replications of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}` */ async projectsLocationsVolumesReplicationsCreate(parent: string, req: Replication, opts: ProjectsLocationsVolumesReplicationsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/replications`); if (opts.replicationId !== undefined) { url.searchParams.append("replicationId", String(opts.replicationId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a replication. * * @param name Required. The replication resource name, in the format `projects/*/locations/*/volumes/*/replications/{replication_id}` */ async projectsLocationsVolumesReplicationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Establish replication peering. * * @param name Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. */ async projectsLocationsVolumesReplicationsEstablishPeering(name: string, req: EstablishPeeringRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:establishPeering`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Describe a replication for a volume. * * @param name Required. The replication resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` */ async projectsLocationsVolumesReplicationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Replication; } /** * Returns descriptions of all replications for a volume. * * @param parent Required. The volume for which to retrieve replication information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`. */ async projectsLocationsVolumesReplicationsList(parent: string, opts: ProjectsLocationsVolumesReplicationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/replications`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListReplicationsResponse; } /** * Updates the settings of a specific replication. * * @param name Identifier. The resource name of the Replication. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. */ async projectsLocationsVolumesReplicationsPatch(name: string, req: Replication, opts: ProjectsLocationsVolumesReplicationsPatchOptions = {}): Promise { opts = serializeProjectsLocationsVolumesReplicationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Resume Cross Region Replication. * * @param name Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. */ async projectsLocationsVolumesReplicationsResume(name: string, req: ResumeReplicationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:resume`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Reverses direction of replication. Source becomes destination and * destination becomes source. * * @param name Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. */ async projectsLocationsVolumesReplicationsReverseDirection(name: string, req: ReverseReplicationDirectionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:reverseDirection`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Stop Cross Region Replication. * * @param name Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. */ async projectsLocationsVolumesReplicationsStop(name: string, req: StopReplicationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:stop`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Syncs the replication. This will invoke one time volume data transfer from * source to destination. * * @param name Required. The resource name of the replication, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. */ async projectsLocationsVolumesReplicationsSync(name: string, req: SyncReplicationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:sync`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Revert an existing volume to a specified snapshot. Warning! This operation * will permanently revert all changes made after the snapshot was created. * * @param name Required. The resource name of the volume, in the format of projects/{project_id}/locations/{location}/volumes/{volume_id}. */ async projectsLocationsVolumesRevert(name: string, req: RevertVolumeRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:revert`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Create a new snapshot for a volume. * * @param parent Required. The NetApp volume to create the snapshots of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}` */ async projectsLocationsVolumesSnapshotsCreate(parent: string, req: Snapshot, opts: ProjectsLocationsVolumesSnapshotsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/snapshots`); if (opts.snapshotId !== undefined) { url.searchParams.append("snapshotId", String(opts.snapshotId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a snapshot. * * @param name Required. The snapshot resource name, in the format `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` */ async projectsLocationsVolumesSnapshotsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Describe a snapshot for a volume. * * @param name Required. The snapshot resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` */ async projectsLocationsVolumesSnapshotsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Snapshot; } /** * Returns descriptions of all snapshots for a volume. * * @param parent Required. The volume for which to retrieve snapshot information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`. */ async projectsLocationsVolumesSnapshotsList(parent: string, opts: ProjectsLocationsVolumesSnapshotsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/snapshots`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListSnapshotsResponse; } /** * Updates the settings of a specific snapshot. * * @param name Identifier. The resource name of the snapshot. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. */ async projectsLocationsVolumesSnapshotsPatch(name: string, req: Snapshot, opts: ProjectsLocationsVolumesSnapshotsPatchOptions = {}): Promise { opts = serializeProjectsLocationsVolumesSnapshotsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } } /** * ActiveDirectory is the public representation of the active directory config. */ export interface ActiveDirectory { /** * Optional. Users to be added to the Built-in Admininstrators group. */ administrators?: string[]; /** * If enabled, AES encryption will be enabled for SMB communication. */ aesEncryption?: boolean; /** * Optional. Users to be added to the Built-in Backup Operator active * directory group. */ backupOperators?: string[]; /** * Output only. Create time of the active directory. */ readonly createTime?: Date; /** * Description of the active directory. */ description?: string; /** * Required. Comma separated list of DNS server IP addresses for the Active * Directory domain. */ dns?: string; /** * Required. Name of the Active Directory domain */ domain?: string; /** * If enabled, traffic between the SMB server to Domain Controller (DC) will * be encrypted. */ encryptDcConnections?: boolean; /** * Name of the active directory machine. This optional parameter is used only * while creating kerberos volume */ kdcHostname?: string; /** * KDC server IP address for the active directory machine. */ kdcIp?: string; /** * Labels for the active directory. */ labels?: { [key: string]: string }; /** * Specifies whether or not the LDAP traffic needs to be signed. */ ldapSigning?: boolean; /** * Identifier. The resource name of the active directory. Format: * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. */ name?: string; /** * Required. NetBIOSPrefix is used as a prefix for SMB server name. */ netBiosPrefix?: string; /** * If enabled, will allow access to local users and LDAP users. If access is * needed for only LDAP users, it has to be disabled. */ nfsUsersWithLdap?: boolean; /** * The Organizational Unit (OU) within the Windows Active Directory the user * belongs to. */ organizationalUnit?: string; /** * Required. Password of the Active Directory domain administrator. */ password?: string; /** * Optional. Domain users to be given the SeSecurityPrivilege. */ securityOperators?: string[]; /** * The Active Directory site the service will limit Domain Controller * discovery too. */ site?: string; /** * Output only. The state of the AD. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "READY" | "UPDATING" | "IN_USE" | "DELETING" | "ERROR" | "DIAGNOSING"; /** * Output only. The state details of the Active Directory. */ readonly stateDetails?: string; /** * Required. Username of the Active Directory domain administrator. */ username?: string; } /** * A NetApp Backup. */ export interface Backup { /** * Output only. Type of backup, manually created or created by a backup * policy. */ readonly backupType?: | "TYPE_UNSPECIFIED" | "MANUAL" | "SCHEDULED"; /** * Output only. Total size of all backups in a chain in bytes = baseline * backup size + sum(incremental backup size) */ readonly chainStorageBytes?: bigint; /** * Output only. The time when the backup was created. */ readonly createTime?: Date; /** * A description of the backup with 2048 characters or less. Requests with * longer descriptions will be rejected. */ description?: string; /** * Resource labels to represent user provided metadata. */ labels?: { [key: string]: string }; /** * Identifier. The resource name of the backup. Format: * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. */ name?: string; /** * If specified, backup will be created from the given snapshot. If not * specified, there will be a new snapshot taken to initiate the backup * creation. Format: * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` */ sourceSnapshot?: string; /** * Volume full name of this backup belongs to. Format: * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` */ sourceVolume?: string; /** * Output only. The backup state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "UPLOADING" | "READY" | "DELETING" | "ERROR" | "UPDATING"; /** * Output only. Size of the file system when the backup was created. When * creating a new volume from the backup, the volume capacity will have to be * at least as big. */ readonly volumeUsageBytes?: bigint; } /** * BackupConfig contains backup related config on a volume. */ export interface BackupConfig { /** * Output only. Total size of all backups in a chain in bytes = baseline * backup size + sum(incremental backup size). */ readonly backupChainBytes?: bigint; /** * Optional. When specified, schedule backups will be created based on the * policy configuration. */ backupPolicies?: string[]; /** * Optional. Name of backup vault. Format: * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} */ backupVault?: string; /** * Optional. When set to true, scheduled backup is enabled on the volume. * This field should be nil when there's no backup policy attached. */ scheduledBackupEnabled?: boolean; } /** * Backup Policy. */ export interface BackupPolicy { /** * Output only. The total number of volumes assigned by this backup policy. */ readonly assignedVolumeCount?: number; /** * Output only. The time when the backup policy was created. */ readonly createTime?: Date; /** * Number of daily backups to keep. Note that the minimum daily backup limit * is 2. */ dailyBackupLimit?: number; /** * Description of the backup policy. */ description?: string; /** * If enabled, make backups automatically according to the schedules. This * will be applied to all volumes that have this policy attached and enforced * on volume level. If not specified, default is true. */ enabled?: boolean; /** * Resource labels to represent user provided metadata. */ labels?: { [key: string]: string }; /** * Number of monthly backups to keep. Note that the sum of daily, weekly and * monthly backups should be greater than 1. */ monthlyBackupLimit?: number; /** * Identifier. The resource name of the backup policy. Format: * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. */ name?: string; /** * Output only. The backup policy state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "READY" | "DELETING" | "ERROR" | "UPDATING"; /** * Number of weekly backups to keep. Note that the sum of daily, weekly and * monthly backups should be greater than 1. */ weeklyBackupLimit?: number; } /** * A NetApp BackupVault. */ export interface BackupVault { /** * Output only. Create time of the backup vault. */ readonly createTime?: Date; /** * Description of the backup vault. */ description?: string; /** * Resource labels to represent user provided metadata. */ labels?: { [key: string]: string }; /** * Identifier. The resource name of the backup vault. Format: * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. */ name?: string; /** * Output only. The backup vault state. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "READY" | "DELETING" | "ERROR" | "UPDATING"; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * Make a snapshot every day e.g. at 04:00, 05:20, 23:50 */ export interface DailySchedule { /** * Set the hour to start the snapshot (0-23), defaults to midnight (0). */ hour?: number; /** * Set the minute of the hour to start the snapshot (0-59), defaults to the * top of the hour (0). */ minute?: number; /** * The maximum number of Snapshots to keep for the hourly schedule */ snapshotsToKeep?: number; } /** * DestinationVolumeParameters specify input parameters used for creating * destination volume. */ export interface DestinationVolumeParameters { /** * Description for the destination volume. */ description?: string; /** * Destination volume's share name. If not specified, source volume's share * name will be used. */ shareName?: string; /** * Required. Existing destination StoragePool name. */ storagePool?: string; /** * Desired destination volume resource id. If not specified, source volume's * resource id will be used. This value must start with a lowercase letter * followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end * with a hyphen. */ volumeId?: string; } /** * EncryptVolumesRequest specifies the KMS config to encrypt existing volumes. */ export interface EncryptVolumesRequest { } /** * EstablishPeeringRequest establishes cluster and svm peerings between the * source and the destination replications. */ export interface EstablishPeeringRequest { /** * Required. Name of the user's local source cluster to be peered with the * destination cluster. */ peerClusterName?: string; /** * Optional. List of IPv4 ip addresses to be used for peering. */ peerIpAddresses?: string[]; /** * Required. Name of the user's local source vserver svm to be peered with * the destination vserver svm. */ peerSvmName?: string; /** * Required. Name of the user's local source volume to be peered with the * destination volume. */ peerVolumeName?: string; } /** * Defines the export policy for the volume. */ export interface ExportPolicy { /** * Required. List of export policy rules */ rules?: SimpleExportPolicyRule[]; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface GoogleProtobufEmpty { } /** * Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. */ export interface HourlySchedule { /** * Set the minute of the hour to start the snapshot (0-59), defaults to the * top of the hour (0). */ minute?: number; /** * The maximum number of Snapshots to keep for the hourly schedule */ snapshotsToKeep?: number; } /** * HybridPeeringDetails contains details about the hybrid peering. */ export interface HybridPeeringDetails { /** * Optional. Copy-paste-able commands to be used on user's ONTAP to accept * peering requests. */ command?: string; /** * Optional. Expiration time for the peering command to be executed on user's * ONTAP. */ commandExpiryTime?: Date; /** * Optional. Temporary passphrase generated to accept cluster peering * command. */ passphrase?: string; /** * Optional. IP address of the subnet. */ subnetIp?: string; } function serializeHybridPeeringDetails(data: any): HybridPeeringDetails { return { ...data, commandExpiryTime: data["commandExpiryTime"] !== undefined ? data["commandExpiryTime"].toISOString() : undefined, }; } function deserializeHybridPeeringDetails(data: any): HybridPeeringDetails { return { ...data, commandExpiryTime: data["commandExpiryTime"] !== undefined ? new Date(data["commandExpiryTime"]) : undefined, }; } /** * The Hybrid Replication parameters for the volume. */ export interface HybridReplicationParameters { /** * Optional. Name of source cluster location associated with the Hybrid * replication. This is a free-form field for the display purpose only. */ clusterLocation?: string; /** * Optional. Description of the replication. */ description?: string; /** * Optional. Labels to be added to the replication as the key value pairs. */ labels?: { [key: string]: string }; /** * Required. Name of the user's local source cluster to be peered with the * destination cluster. */ peerClusterName?: string; /** * Required. List of node ip addresses to be peered with. */ peerIpAddresses?: string[]; /** * Required. Name of the user's local source vserver svm to be peered with * the destination vserver svm. */ peerSvmName?: string; /** * Required. Name of the user's local source volume to be peered with the * destination volume. */ peerVolumeName?: string; /** * Required. Desired name for the replication of this volume. */ replication?: string; } /** * KmsConfig is the customer managed encryption key(CMEK) configuration. */ export interface KmsConfig { /** * Output only. Create time of the KmsConfig. */ readonly createTime?: Date; /** * Required. Customer managed crypto key resource full name. Format: * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. */ cryptoKeyName?: string; /** * Description of the KmsConfig. */ description?: string; /** * Output only. Instructions to provide the access to the customer provided * encryption key. */ readonly instructions?: string; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * Identifier. Name of the KmsConfig. */ name?: string; /** * Output only. The Service account which will have access to the customer * provided encryption key. */ readonly serviceAccount?: string; /** * Output only. State of the KmsConfig. */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "CREATING" | "DELETING" | "UPDATING" | "IN_USE" | "ERROR" | "KEY_CHECK_PENDING" | "KEY_NOT_REACHABLE" | "DISABLING" | "DISABLED" | "MIGRATING"; /** * Output only. State details of the KmsConfig. */ readonly stateDetails?: string; } /** * ListActiveDirectoriesResponse contains all the active directories requested. */ export interface ListActiveDirectoriesResponse { /** * The list of active directories. */ activeDirectories?: ActiveDirectory[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListBackupPoliciesResponse contains all the backup policies requested. */ export interface ListBackupPoliciesResponse { /** * The list of backup policies. */ backupPolicies?: BackupPolicy[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListBackupsResponse is the result of ListBackupsRequest. */ export interface ListBackupsResponse { /** * A list of backups in the project. */ backups?: Backup[]; /** * The token you can use to retrieve the next page of results. Not returned * if there are no more results in the list. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListBackupVaultsResponse is the result of ListBackupVaultsRequest. */ export interface ListBackupVaultsResponse { /** * A list of backupVaults in the project for the specified location. */ backupVaults?: BackupVault[]; /** * The token you can use to retrieve the next page of results. Not returned * if there are no more results in the list. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListKmsConfigsResponse is the response to a ListKmsConfigsRequest. */ export interface ListKmsConfigsResponse { /** * The list of KmsConfigs */ kmsConfigs?: KmsConfig[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Location[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; } /** * ListQuotaRulesResponse is the response to a ListQuotaRulesRequest. */ export interface ListQuotaRulesResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * List of quota rules */ quotaRules?: QuotaRule[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListReplicationsResponse is the result of ListReplicationsRequest. */ export interface ListReplicationsResponse { /** * The token you can use to retrieve the next page of results. Not returned * if there are no more results in the list. */ nextPageToken?: string; /** * A list of replications in the project for the specified volume. */ replications?: Replication[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListSnapshotsResponse is the result of ListSnapshotsRequest. */ export interface ListSnapshotsResponse { /** * The token you can use to retrieve the next page of results. Not returned * if there are no more results in the list. */ nextPageToken?: string; /** * A list of snapshots in the project for the specified volume. */ snapshots?: Snapshot[]; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * ListStoragePoolsResponse is the response to a ListStoragePoolsRequest. */ export interface ListStoragePoolsResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * The list of StoragePools */ storagePools?: StoragePool[]; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListStoragePoolsResponse(data: any): ListStoragePoolsResponse { return { ...data, storagePools: data["storagePools"] !== undefined ? data["storagePools"].map((item: any) => (serializeStoragePool(item))) : undefined, }; } function deserializeListStoragePoolsResponse(data: any): ListStoragePoolsResponse { return { ...data, storagePools: data["storagePools"] !== undefined ? data["storagePools"].map((item: any) => (deserializeStoragePool(item))) : undefined, }; } /** * Message for response to listing Volumes */ export interface ListVolumesResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; /** * The list of Volume */ volumes?: Volume[]; } function serializeListVolumesResponse(data: any): ListVolumesResponse { return { ...data, volumes: data["volumes"] !== undefined ? data["volumes"].map((item: any) => (serializeVolume(item))) : undefined, }; } function deserializeListVolumesResponse(data: any): ListVolumesResponse { return { ...data, volumes: data["volumes"] !== undefined ? data["volumes"].map((item: any) => (deserializeVolume(item))) : undefined, }; } /** * A resource that represents a Google Cloud location. */ export interface Location { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * Metadata for a given google.cloud.location.Location. */ export interface LocationMetadata { /** * Output only. Supported service levels in a location. */ readonly supportedServiceLevels?: | "SERVICE_LEVEL_UNSPECIFIED" | "PREMIUM" | "EXTREME" | "STANDARD" | "FLEX"[]; } /** * Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50 */ export interface MonthlySchedule { /** * Set the day or days of the month to make a snapshot (1-31). Accepts a * comma separated number of days. Defaults to '1'. */ daysOfMonth?: string; /** * Set the hour to start the snapshot (0-23), defaults to midnight (0). */ hour?: number; /** * Set the minute of the hour to start the snapshot (0-59), defaults to the * top of the hour (0). */ minute?: number; /** * The maximum number of Snapshots to keep for the hourly schedule */ snapshotsToKeep?: number; } /** * View only mount options for a volume. */ export interface MountOption { /** * Export string */ export?: string; /** * Full export string */ exportFull?: string; /** * Instructions for mounting */ instructions?: string; /** * Protocol to mount with. */ protocol?: | "PROTOCOLS_UNSPECIFIED" | "NFSV3" | "NFSV4" | "SMB"; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been canceled successfully have * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * Additional options for NetApp#projectsLocationsActiveDirectoriesCreate. */ export interface ProjectsLocationsActiveDirectoriesCreateOptions { /** * Required. ID of the active directory to create. Must be unique within the * parent resource. Must contain only letters, numbers and hyphen, with the * first character a letter , the last a letter or a number, and a 63 * character maximum. */ activeDirectoryId?: string; } /** * Additional options for NetApp#projectsLocationsActiveDirectoriesList. */ export interface ProjectsLocationsActiveDirectoriesListOptions { /** * Filtering results */ filter?: string; /** * Hint for how to order the results */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, the server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsActiveDirectoriesPatch. */ export interface ProjectsLocationsActiveDirectoriesPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the Active Directory resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsActiveDirectoriesPatchOptions(data: any): ProjectsLocationsActiveDirectoriesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsActiveDirectoriesPatchOptions(data: any): ProjectsLocationsActiveDirectoriesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsBackupPoliciesCreate. */ export interface ProjectsLocationsBackupPoliciesCreateOptions { /** * Required. The ID to use for the backup policy. The ID must be unique * within the specified location. Must contain only letters, numbers and * hyphen, with the first character a letter, the last a letter or a number, * and a 63 character maximum. */ backupPolicyId?: string; } /** * Additional options for NetApp#projectsLocationsBackupPoliciesList. */ export interface ProjectsLocationsBackupPoliciesListOptions { /** * Filtering results */ filter?: string; /** * Hint for how to order the results */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, the server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsBackupPoliciesPatch. */ export interface ProjectsLocationsBackupPoliciesPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the Backup Policy resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsBackupPoliciesPatchOptions(data: any): ProjectsLocationsBackupPoliciesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupPoliciesPatchOptions(data: any): ProjectsLocationsBackupPoliciesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsBackupVaultsBackupsCreate. */ export interface ProjectsLocationsBackupVaultsBackupsCreateOptions { /** * Required. The ID to use for the backup. The ID must be unique within the * specified backupVault. Must contain only letters, numbers and hyphen, with * the first character a letter, the last a letter or a number, and a 63 * character maximum. */ backupId?: string; } /** * Additional options for NetApp#projectsLocationsBackupVaultsBackupsList. */ export interface ProjectsLocationsBackupVaultsBackupsListOptions { /** * The standard list filter. If specified, backups will be returned based on * the attribute name that matches the filter expression. If empty, then no * backups are filtered out. See https://google.aip.dev/160 */ filter?: string; /** * Sort results. Supported values are "name", "name desc" or "" (unsorted). */ orderBy?: string; /** * The maximum number of items to return. The service may return fewer than * this value. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * The next_page_token value to use if there are additional results to * retrieve for this list request. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsBackupVaultsBackupsPatch. */ export interface ProjectsLocationsBackupVaultsBackupsPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the Backup resource to be updated. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsBackupVaultsBackupsPatchOptions(data: any): ProjectsLocationsBackupVaultsBackupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupVaultsBackupsPatchOptions(data: any): ProjectsLocationsBackupVaultsBackupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsBackupVaultsCreate. */ export interface ProjectsLocationsBackupVaultsCreateOptions { /** * Required. The ID to use for the backupVault. The ID must be unique within * the specified location. Must contain only letters, numbers and hyphen, with * the first character a letter, the last a letter or a number, and a 63 * character maximum. */ backupVaultId?: string; } /** * Additional options for NetApp#projectsLocationsBackupVaultsList. */ export interface ProjectsLocationsBackupVaultsListOptions { /** * List filter. */ filter?: string; /** * Sort results. Supported values are "name", "name desc" or "" (unsorted). */ orderBy?: string; /** * The maximum number of items to return. */ pageSize?: number; /** * The next_page_token value to use if there are additional results to * retrieve for this list request. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsBackupVaultsPatch. */ export interface ProjectsLocationsBackupVaultsPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the Backup resource to be updated. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsBackupVaultsPatchOptions(data: any): ProjectsLocationsBackupVaultsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupVaultsPatchOptions(data: any): ProjectsLocationsBackupVaultsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsKmsConfigsCreate. */ export interface ProjectsLocationsKmsConfigsCreateOptions { /** * Required. Id of the requesting KmsConfig. Must be unique within the parent * resource. Must contain only letters, numbers and hyphen, with the first * character a letter, the last a letter or a number, and a 63 character * maximum. */ kmsConfigId?: string; } /** * Additional options for NetApp#projectsLocationsKmsConfigsList. */ export interface ProjectsLocationsKmsConfigsListOptions { /** * List filter. */ filter?: string; /** * Sort results. Supported values are "name", "name desc" or "" (unsorted). */ orderBy?: string; /** * The maximum number of items to return. */ pageSize?: number; /** * The next_page_token value to use if there are additional results to * retrieve for this list request. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsKmsConfigsPatch. */ export interface ProjectsLocationsKmsConfigsPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the KmsConfig resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsKmsConfigsPatchOptions(data: any): ProjectsLocationsKmsConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsKmsConfigsPatchOptions(data: any): ProjectsLocationsKmsConfigsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * A filter to narrow down results to a preferred subset. The filtering * language accepts strings like `"displayName=tokyo"`, and is documented in * more detail in [AIP-160](https://google.aip.dev/160). */ filter?: string; /** * The maximum number of results to return. If not set, the service selects a * default. */ pageSize?: number; /** * A page token received from the `next_page_token` field in the response. * Send that page token to receive the subsequent page. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsStoragePoolsCreate. */ export interface ProjectsLocationsStoragePoolsCreateOptions { /** * Required. Id of the requesting storage pool. Must be unique within the * parent resource. Must contain only letters, numbers and hyphen, with the * first character a letter, the last a letter or a number, and a 63 character * maximum. */ storagePoolId?: string; } /** * Additional options for NetApp#projectsLocationsStoragePoolsList. */ export interface ProjectsLocationsStoragePoolsListOptions { /** * Optional. List filter. */ filter?: string; /** * Optional. Sort results. Supported values are "name", "name desc" or "" * (unsorted). */ orderBy?: string; /** * Optional. The maximum number of items to return. */ pageSize?: number; /** * Optional. The next_page_token value to use if there are additional results * to retrieve for this list request. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsStoragePoolsPatch. */ export interface ProjectsLocationsStoragePoolsPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the StoragePool resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsStoragePoolsPatchOptions(data: any): ProjectsLocationsStoragePoolsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsStoragePoolsPatchOptions(data: any): ProjectsLocationsStoragePoolsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsVolumesCreate. */ export interface ProjectsLocationsVolumesCreateOptions { /** * Required. Id of the requesting volume. Must be unique within the parent * resource. Must contain only letters, numbers and hyphen, with the first * character a letter, the last a letter or a number, and a 63 character * maximum. */ volumeId?: string; } /** * Additional options for NetApp#projectsLocationsVolumesDelete. */ export interface ProjectsLocationsVolumesDeleteOptions { /** * If this field is set as true, CCFE will not block the volume resource * deletion even if it has any snapshots resource. (Otherwise, the request * will only work if the volume has no snapshots.) */ force?: boolean; } /** * Additional options for NetApp#projectsLocationsVolumesList. */ export interface ProjectsLocationsVolumesListOptions { /** * Filtering results */ filter?: string; /** * Hint for how to order the results */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, the server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsVolumesPatch. */ export interface ProjectsLocationsVolumesPatchOptions { /** * Required. Field mask is used to specify the fields to be overwritten in * the Volume resource by the update. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsVolumesPatchOptions(data: any): ProjectsLocationsVolumesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVolumesPatchOptions(data: any): ProjectsLocationsVolumesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsVolumesQuotaRulesCreate. */ export interface ProjectsLocationsVolumesQuotaRulesCreateOptions { /** * Required. ID of the quota rule to create. Must be unique within the parent * resource. Must contain only letters, numbers, underscore and hyphen, with * the first character a letter or underscore, the last a letter or underscore * or a number, and a 63 character maximum. */ quotaRuleId?: string; } /** * Additional options for NetApp#projectsLocationsVolumesQuotaRulesList. */ export interface ProjectsLocationsVolumesQuotaRulesListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Hint for how to order the results */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, the server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsVolumesQuotaRulesPatch. */ export interface ProjectsLocationsVolumesQuotaRulesPatchOptions { /** * Optional. Field mask is used to specify the fields to be overwritten in * the Quota Rule resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsVolumesQuotaRulesPatchOptions(data: any): ProjectsLocationsVolumesQuotaRulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVolumesQuotaRulesPatchOptions(data: any): ProjectsLocationsVolumesQuotaRulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsVolumesReplicationsCreate. */ export interface ProjectsLocationsVolumesReplicationsCreateOptions { /** * Required. ID of the replication to create. Must be unique within the * parent resource. Must contain only letters, numbers and hyphen, with the * first character a letter, the last a letter or a number, and a 63 character * maximum. */ replicationId?: string; } /** * Additional options for NetApp#projectsLocationsVolumesReplicationsList. */ export interface ProjectsLocationsVolumesReplicationsListOptions { /** * List filter. */ filter?: string; /** * Sort results. Supported values are "name", "name desc" or "" (unsorted). */ orderBy?: string; /** * The maximum number of items to return. */ pageSize?: number; /** * The next_page_token value to use if there are additional results to * retrieve for this list request. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsVolumesReplicationsPatch. */ export interface ProjectsLocationsVolumesReplicationsPatchOptions { /** * Required. Mask of fields to update. At least one path must be supplied in * this field. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsVolumesReplicationsPatchOptions(data: any): ProjectsLocationsVolumesReplicationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVolumesReplicationsPatchOptions(data: any): ProjectsLocationsVolumesReplicationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for NetApp#projectsLocationsVolumesSnapshotsCreate. */ export interface ProjectsLocationsVolumesSnapshotsCreateOptions { /** * Required. ID of the snapshot to create. Must be unique within the parent * resource. Must contain only letters, numbers and hyphen, with the first * character a letter, the last a letter or a number, and a 63 character * maximum. */ snapshotId?: string; } /** * Additional options for NetApp#projectsLocationsVolumesSnapshotsList. */ export interface ProjectsLocationsVolumesSnapshotsListOptions { /** * List filter. */ filter?: string; /** * Sort results. Supported values are "name", "name desc" or "" (unsorted). */ orderBy?: string; /** * The maximum number of items to return. */ pageSize?: number; /** * The next_page_token value to use if there are additional results to * retrieve for this list request. */ pageToken?: string; } /** * Additional options for NetApp#projectsLocationsVolumesSnapshotsPatch. */ export interface ProjectsLocationsVolumesSnapshotsPatchOptions { /** * Required. Mask of fields to update. At least one path must be supplied in * this field. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsVolumesSnapshotsPatchOptions(data: any): ProjectsLocationsVolumesSnapshotsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsVolumesSnapshotsPatchOptions(data: any): ProjectsLocationsVolumesSnapshotsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * QuotaRule specifies the maximum disk space a user or group can use within a * volume. They can be used for creating default and individual quota rules. */ export interface QuotaRule { /** * Output only. Create time of the quota rule */ readonly createTime?: Date; /** * Optional. Description of the quota rule */ description?: string; /** * Required. The maximum allowed disk space in MiB. */ diskLimitMib?: number; /** * Optional. Labels of the quota rule */ labels?: { [key: string]: string }; /** * Identifier. The resource name of the active directory. Format: * `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id}`. */ name?: string; /** * Output only. State of the quota rule */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "UPDATING" | "DELETING" | "READY" | "ERROR"; /** * Output only. State details of the quota rule */ readonly stateDetails?: string; /** * Optional. The quota rule applies to the specified user or group, * identified by a Unix UID/GID, Windows SID, or null for default. */ target?: string; /** * Required. The type of quota rule. */ type?: | "TYPE_UNSPECIFIED" | "INDIVIDUAL_USER_QUOTA" | "INDIVIDUAL_GROUP_QUOTA" | "DEFAULT_USER_QUOTA" | "DEFAULT_GROUP_QUOTA"; } /** * Replication is a nested resource under Volume, that describes a cross-region * replication relationship between 2 volumes in different regions. */ export interface Replication { /** * Optional. Location of the user cluster. */ clusterLocation?: string; /** * Output only. Replication create time. */ readonly createTime?: Date; /** * A description about this replication relationship. */ description?: string; /** * Output only. Full name of destination volume resource. Example : * "projects/{project}/locations/{location}/volumes/{volume_id}" */ readonly destinationVolume?: string; /** * Required. Input only. Destination volume parameters */ destinationVolumeParameters?: DestinationVolumeParameters; /** * Output only. Condition of the relationship. Can be one of the following: - * true: The replication relationship is healthy. It has not missed the most * recent scheduled transfer. - false: The replication relationship is not * healthy. It has missed the most recent scheduled transfer. */ readonly healthy?: boolean; /** * Output only. Hybrid peering details. */ readonly hybridPeeringDetails?: HybridPeeringDetails; /** * Output only. Type of the hybrid replication. */ readonly hybridReplicationType?: | "HYBRID_REPLICATION_TYPE_UNSPECIFIED" | "MIGRATION" | "CONTINUOUS_REPLICATION"; /** * Resource labels to represent user provided metadata. */ labels?: { [key: string]: string }; /** * Output only. Indicates the state of mirroring. */ readonly mirrorState?: | "MIRROR_STATE_UNSPECIFIED" | "PREPARING" | "MIRRORED" | "STOPPED" | "TRANSFERRING" | "BASELINE_TRANSFERRING" | "ABORTED"; /** * Identifier. The resource name of the Replication. Format: * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. */ name?: string; /** * Required. Indicates the schedule for replication. */ replicationSchedule?: | "REPLICATION_SCHEDULE_UNSPECIFIED" | "EVERY_10_MINUTES" | "HOURLY" | "DAILY"; /** * Output only. Indicates whether this points to source or destination. */ readonly role?: | "REPLICATION_ROLE_UNSPECIFIED" | "SOURCE" | "DESTINATION"; /** * Output only. Full name of source volume resource. Example : * "projects/{project}/locations/{location}/volumes/{volume_id}" */ readonly sourceVolume?: string; /** * Output only. State of the replication. */ readonly state?: | "STATE_UNSPECIFIED" | "CREATING" | "READY" | "UPDATING" | "DELETING" | "ERROR" | "PENDING_CLUSTER_PEERING" | "PENDING_SVM_PEERING"; /** * Output only. State details of the replication. */ readonly stateDetails?: string; /** * Output only. Replication transfer statistics. */ readonly transferStats?: TransferStats; } /** * The RestoreParameters if volume is created from a snapshot or backup. */ export interface RestoreParameters { /** * Full name of the backup resource. Format: * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} */ sourceBackup?: string; /** * Full name of the snapshot resource. Format: * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} */ sourceSnapshot?: string; } /** * ResumeReplicationRequest resumes a stopped replication. */ export interface ResumeReplicationRequest { } /** * ReverseReplicationDirectionRequest reverses direction of replication. Source * becomes destination and destination becomes source. */ export interface ReverseReplicationDirectionRequest { } /** * RevertVolumeRequest reverts the given volume to the specified snapshot. */ export interface RevertVolumeRequest { /** * Required. The snapshot resource ID, in the format 'my-snapshot', where the * specified ID is the {snapshot_id} of the fully qualified name like * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} */ snapshotId?: string; } /** * An export policy rule describing various export options. */ export interface SimpleExportPolicyRule { /** * Access type (ReadWrite, ReadOnly, None) */ accessType?: | "ACCESS_TYPE_UNSPECIFIED" | "READ_ONLY" | "READ_WRITE" | "READ_NONE"; /** * Comma separated list of allowed clients IP addresses */ allowedClients?: string; /** * Whether Unix root access will be granted. */ hasRootAccess?: string; /** * If enabled (true) the rule defines a read only access for clients matching * the 'allowedClients' specification. It enables nfs clients to mount using * 'integrity' kerberos security mode. */ kerberos5iReadOnly?: boolean; /** * If enabled (true) the rule defines read and write access for clients * matching the 'allowedClients' specification. It enables nfs clients to * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' * value be ignored if this is enabled. */ kerberos5iReadWrite?: boolean; /** * If enabled (true) the rule defines a read only access for clients matching * the 'allowedClients' specification. It enables nfs clients to mount using * 'privacy' kerberos security mode. */ kerberos5pReadOnly?: boolean; /** * If enabled (true) the rule defines read and write access for clients * matching the 'allowedClients' specification. It enables nfs clients to * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' * value be ignored if this is enabled. */ kerberos5pReadWrite?: boolean; /** * If enabled (true) the rule defines a read only access for clients matching * the 'allowedClients' specification. It enables nfs clients to mount using * 'authentication' kerberos security mode. */ kerberos5ReadOnly?: boolean; /** * If enabled (true) the rule defines read and write access for clients * matching the 'allowedClients' specification. It enables nfs clients to * mount using 'authentication' kerberos security mode. The * 'kerberos5ReadOnly' value be ignored if this is enabled. */ kerberos5ReadWrite?: boolean; /** * NFS V3 protocol. */ nfsv3?: boolean; /** * NFS V4 protocol. */ nfsv4?: boolean; } /** * Snapshot is a point-in-time version of a Volume's content. */ export interface Snapshot { /** * Output only. The time when the snapshot was created. */ readonly createTime?: Date; /** * A description of the snapshot with 2048 characters or less. Requests with * longer descriptions will be rejected. */ description?: string; /** * Resource labels to represent user provided metadata. */ labels?: { [key: string]: string }; /** * Identifier. The resource name of the snapshot. Format: * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. */ name?: string; /** * Output only. The snapshot state. */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "CREATING" | "DELETING" | "UPDATING" | "DISABLED" | "ERROR"; /** * Output only. State details of the storage pool */ readonly stateDetails?: string; /** * Output only. Current storage usage for the snapshot in bytes. */ readonly usedBytes?: number; } /** * Snapshot Policy for a volume. */ export interface SnapshotPolicy { /** * Daily schedule policy. */ dailySchedule?: DailySchedule; /** * If enabled, make snapshots automatically according to the schedules. * Default is false. */ enabled?: boolean; /** * Hourly schedule policy. */ hourlySchedule?: HourlySchedule; /** * Monthly schedule policy. */ monthlySchedule?: MonthlySchedule; /** * Weekly schedule policy. */ weeklySchedule?: WeeklySchedule; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * StopReplicationRequest stops a replication until resumed. */ export interface StopReplicationRequest { /** * Indicates whether to stop replication forcefully while data transfer is in * progress. Warning! if force is true, this will abort any current transfers * and can lead to data loss due to partial transfer. If force is false, stop * replication will fail while data transfer is in progress and you will need * to retry later. */ force?: boolean; } /** * StoragePool is a container for volumes with a service level and capacity. * Volumes can be created in a pool of sufficient available capacity. * StoragePool capacity is what you are billed for. */ export interface StoragePool { /** * Optional. Specifies the Active Directory to be used for creating a SMB * volume. */ activeDirectory?: string; /** * Optional. True if the storage pool supports Auto Tiering enabled volumes. * Default is false. Auto-tiering can be enabled after storage pool creation * but it can't be disabled once enabled. */ allowAutoTiering?: boolean; /** * Required. Capacity in GIB of the pool */ capacityGib?: bigint; /** * Output only. Create time of the storage pool */ readonly createTime?: Date; /** * Optional. Description of the storage pool */ description?: string; /** * Output only. Specifies the current pool encryption key source. */ readonly encryptionType?: | "ENCRYPTION_TYPE_UNSPECIFIED" | "SERVICE_MANAGED" | "CLOUD_KMS"; /** * Deprecated. Used to allow SO pool to access AD or DNS server from other * regions. */ globalAccessAllowed?: boolean; /** * Optional. Specifies the KMS config to be used for volume encryption. */ kmsConfig?: string; /** * Optional. Labels as key value pairs */ labels?: { [key: string]: string }; /** * Optional. Flag indicating if the pool is NFS LDAP enabled or not. */ ldapEnabled?: boolean; /** * Identifier. Name of the storage pool */ name?: string; /** * Required. VPC Network name. Format: * projects/{project}/global/networks/{network} */ network?: string; /** * Optional. This field is not implemented. The values provided in this field * are ignored. */ psaRange?: string; /** * Optional. Specifies the replica zone for regional storagePool. */ replicaZone?: string; /** * Required. Service level of the storage pool */ serviceLevel?: | "SERVICE_LEVEL_UNSPECIFIED" | "PREMIUM" | "EXTREME" | "STANDARD" | "FLEX"; /** * Output only. State of the storage pool */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "CREATING" | "DELETING" | "UPDATING" | "RESTORING" | "DISABLED" | "ERROR"; /** * Output only. State details of the storage pool */ readonly stateDetails?: string; /** * Output only. Allocated size of all volumes in GIB in the storage pool */ readonly volumeCapacityGib?: bigint; /** * Output only. Volume count of the storage pool */ readonly volumeCount?: number; /** * Optional. Specifies the active zone for regional storagePool. */ zone?: string; } function serializeStoragePool(data: any): StoragePool { return { ...data, capacityGib: data["capacityGib"] !== undefined ? String(data["capacityGib"]) : undefined, }; } function deserializeStoragePool(data: any): StoragePool { return { ...data, capacityGib: data["capacityGib"] !== undefined ? BigInt(data["capacityGib"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, volumeCapacityGib: data["volumeCapacityGib"] !== undefined ? BigInt(data["volumeCapacityGib"]) : undefined, }; } /** * SwitchActiveReplicaZoneRequest switch the active/replica zone for a regional * storagePool. */ export interface SwitchActiveReplicaZoneRequest { } /** * SyncReplicationRequest syncs the replication from source to destination. */ export interface SyncReplicationRequest { } /** * Defines tiering policy for the volume. */ export interface TieringPolicy { /** * Optional. Time in days to mark the volume's data block as cold and make it * eligible for tiering, can be range from 7-183. Default is 31. */ coolingThresholdDays?: number; /** * Optional. Flag indicating if the volume has tiering policy enable/pause. * Default is PAUSED. */ tierAction?: | "TIER_ACTION_UNSPECIFIED" | "ENABLED" | "PAUSED"; } /** * TransferStats reports all statistics related to replication transfer. */ export interface TransferStats { /** * Lag duration indicates the duration by which Destination region volume * content lags behind the primary region volume content. */ lagDuration?: number /* Duration */; /** * Last transfer size in bytes. */ lastTransferBytes?: bigint; /** * Time taken during last transfer. */ lastTransferDuration?: number /* Duration */; /** * Time when last transfer completed. */ lastTransferEndTime?: Date; /** * A message describing the cause of the last transfer failure. */ lastTransferError?: string; /** * Cumulative time taken across all transfers for the replication * relationship. */ totalTransferDuration?: number /* Duration */; /** * Cumulative bytes trasferred so far for the replication relatinonship. */ transferBytes?: bigint; /** * Time when progress was updated last. */ updateTime?: Date; } function serializeTransferStats(data: any): TransferStats { return { ...data, lagDuration: data["lagDuration"] !== undefined ? data["lagDuration"] : undefined, lastTransferBytes: data["lastTransferBytes"] !== undefined ? String(data["lastTransferBytes"]) : undefined, lastTransferDuration: data["lastTransferDuration"] !== undefined ? data["lastTransferDuration"] : undefined, lastTransferEndTime: data["lastTransferEndTime"] !== undefined ? data["lastTransferEndTime"].toISOString() : undefined, totalTransferDuration: data["totalTransferDuration"] !== undefined ? data["totalTransferDuration"] : undefined, transferBytes: data["transferBytes"] !== undefined ? String(data["transferBytes"]) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeTransferStats(data: any): TransferStats { return { ...data, lagDuration: data["lagDuration"] !== undefined ? data["lagDuration"] : undefined, lastTransferBytes: data["lastTransferBytes"] !== undefined ? BigInt(data["lastTransferBytes"]) : undefined, lastTransferDuration: data["lastTransferDuration"] !== undefined ? data["lastTransferDuration"] : undefined, lastTransferEndTime: data["lastTransferEndTime"] !== undefined ? new Date(data["lastTransferEndTime"]) : undefined, totalTransferDuration: data["totalTransferDuration"] !== undefined ? data["totalTransferDuration"] : undefined, transferBytes: data["transferBytes"] !== undefined ? BigInt(data["transferBytes"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * VerifyKmsConfigRequest specifies the KMS config to be validated. */ export interface VerifyKmsConfigRequest { } /** * VerifyKmsConfigResponse contains the information if the config is correctly * and error message. */ export interface VerifyKmsConfigResponse { /** * Output only. Error message if config is not healthy. */ readonly healthError?: string; /** * Output only. If the customer key configured correctly to the encrypt * volume. */ readonly healthy?: boolean; /** * Output only. Instructions for the customers to provide the access to the * encryption key. */ readonly instructions?: string; } /** * Volume provides a filesystem that you can mount. */ export interface Volume { /** * Output only. Specifies the ActiveDirectory name of a SMB volume. */ readonly activeDirectory?: string; /** * BackupConfig of the volume. */ backupConfig?: BackupConfig; /** * Required. Capacity in GIB of the volume */ capacityGib?: bigint; /** * Output only. Size of the volume cold tier data in GiB. */ readonly coldTierSizeGib?: bigint; /** * Output only. Create time of the volume */ readonly createTime?: Date; /** * Optional. Description of the volume */ description?: string; /** * Output only. Specified the current volume encryption key source. */ readonly encryptionType?: | "ENCRYPTION_TYPE_UNSPECIFIED" | "SERVICE_MANAGED" | "CLOUD_KMS"; /** * Optional. Export policy of the volume */ exportPolicy?: ExportPolicy; /** * Output only. Indicates whether the volume is part of a replication * relationship. */ readonly hasReplication?: boolean; /** * Optional. The Hybrid Replication parameters for the volume. */ hybridReplicationParameters?: HybridReplicationParameters; /** * Optional. Flag indicating if the volume is a kerberos volume or not, * export policy rules control kerberos security modes (krb5, krb5i, krb5p). */ kerberosEnabled?: boolean; /** * Output only. Specifies the KMS config to be used for volume encryption. */ readonly kmsConfig?: string; /** * Optional. Labels as key value pairs */ labels?: { [key: string]: string }; /** * Optional. Flag indicating if the volume will be a large capacity volume or * a regular volume. */ largeCapacity?: boolean; /** * Output only. Flag indicating if the volume is NFS LDAP enabled or not. */ readonly ldapEnabled?: boolean; /** * Output only. Mount options of this volume */ readonly mountOptions?: MountOption[]; /** * Optional. Flag indicating if the volume will have an IP address per node * for volumes supporting multiple IP endpoints. Only the volume with * large_capacity will be allowed to have multiple endpoints. */ multipleEndpoints?: boolean; /** * Identifier. Name of the volume */ name?: string; /** * Output only. VPC Network name. Format: * projects/{project}/global/networks/{network} */ readonly network?: string; /** * Required. Protocols required for the volume */ protocols?: | "PROTOCOLS_UNSPECIFIED" | "NFSV3" | "NFSV4" | "SMB"[]; /** * Output only. This field is not implemented. The values provided in this * field are ignored. */ readonly psaRange?: string; /** * Output only. Specifies the replica zone for regional volume. */ readonly replicaZone?: string; /** * Optional. Specifies the source of the volume to be created from. */ restoreParameters?: RestoreParameters; /** * Optional. List of actions that are restricted on this volume. */ restrictedActions?: | "RESTRICTED_ACTION_UNSPECIFIED" | "DELETE"[]; /** * Optional. Security Style of the Volume */ securityStyle?: | "SECURITY_STYLE_UNSPECIFIED" | "NTFS" | "UNIX"; /** * Output only. Service level of the volume */ readonly serviceLevel?: | "SERVICE_LEVEL_UNSPECIFIED" | "PREMIUM" | "EXTREME" | "STANDARD" | "FLEX"; /** * Required. Share name of the volume */ shareName?: string; /** * Optional. SMB share settings for the volume. */ smbSettings?: | "SMB_SETTINGS_UNSPECIFIED" | "ENCRYPT_DATA" | "BROWSABLE" | "CHANGE_NOTIFY" | "NON_BROWSABLE" | "OPLOCKS" | "SHOW_SNAPSHOT" | "SHOW_PREVIOUS_VERSIONS" | "ACCESS_BASED_ENUMERATION" | "CONTINUOUSLY_AVAILABLE"[]; /** * Optional. Snap_reserve specifies percentage of volume storage reserved for * snapshot storage. Default is 0 percent. */ snapReserve?: number; /** * Optional. Snapshot_directory if enabled (true) the volume will contain a * read-only .snapshot directory which provides access to each of the volume's * snapshots. */ snapshotDirectory?: boolean; /** * Optional. SnapshotPolicy for a volume. */ snapshotPolicy?: SnapshotPolicy; /** * Output only. State of the volume */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "CREATING" | "DELETING" | "UPDATING" | "RESTORING" | "DISABLED" | "ERROR" | "PREPARING" | "READ_ONLY"; /** * Output only. State details of the volume */ readonly stateDetails?: string; /** * Required. StoragePool name of the volume */ storagePool?: string; /** * Tiering policy for the volume. */ tieringPolicy?: TieringPolicy; /** * Optional. Default unix style permission (e.g. 777) the mount point will be * created with. Applicable for NFS protocol types only. */ unixPermissions?: string; /** * Output only. Used capacity in GIB of the volume. This is computed * periodically and it does not represent the realtime usage. */ readonly usedGib?: bigint; /** * Output only. Specifies the active zone for regional volume. */ readonly zone?: string; } function serializeVolume(data: any): Volume { return { ...data, capacityGib: data["capacityGib"] !== undefined ? String(data["capacityGib"]) : undefined, }; } function deserializeVolume(data: any): Volume { return { ...data, capacityGib: data["capacityGib"] !== undefined ? BigInt(data["capacityGib"]) : undefined, coldTierSizeGib: data["coldTierSizeGib"] !== undefined ? BigInt(data["coldTierSizeGib"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, usedGib: data["usedGib"] !== undefined ? BigInt(data["usedGib"]) : undefined, }; } /** * Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday * 23:50 */ export interface WeeklySchedule { /** * Set the day or days of the week to make a snapshot. Accepts a comma * separated days of the week. Defaults to 'Sunday'. */ day?: string; /** * Set the hour to start the snapshot (0-23), defaults to midnight (0). */ hour?: number; /** * Set the minute of the hour to start the snapshot (0-59), defaults to the * top of the hour (0). */ minute?: number; /** * The maximum number of Snapshots to keep for the hourly schedule */ snapshotsToKeep?: number; }