# Google Cloud Net App V1 Client - Class BackupVault (1.12.0)

1.12.0 (latest) 1.11.0 1.10.2 1.9.0 1.8.1 1.7.0 1.6.1 1.4.0 1.3.1 1.2.1 1.1.1 1.0.1 0.3.1 0.2.6 0.1.1 Reference documentation and code samples for the Google Cloud Net App V1 Client class BackupVault.

A NetApp BackupVault.

Generated from protobuf message `google.cloud.netapp.v1.BackupVault`

## Namespace

Google \\ Cloud \\ NetApp \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the backup vault. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. |
| `↳ state` | `int` Output only. The backup vault state. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Create time of the backup vault. |
| `↳ description` | `string` Description of the backup vault. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Resource labels to represent user provided metadata. |
| `↳ backup_vault_type` | `int` Optional. Type of backup vault to be created. Default is IN_REGION. |
| `↳ source_region` | `string` Output only. Region in which the backup vault is created. Format: `projects/{project_id}/locations/{location}` |
| `↳ backup_region` | `string` Optional. Region where the backups are stored. Format: `projects/{project_id}/locations/{location}` |
| `↳ source_backup_vault` | `string` Output only. Name of the Backup vault created in source region. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` |
| `↳ destination_backup_vault` | `string` Output only. Name of the Backup vault created in backup region. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` |
| `↳ backup_retention_policy` | `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.BackupRetentionPolicy` Optional. Backup retention policy defining the retention of backups. |
| `↳ kms_config` | `string` Optional. Specifies the Key Management System (KMS) configuration to be used for backup encryption. Format: `projects/{project}/locations/{location}/kmsConfigs/{kms_config}` |
| `↳ encryption_state` | `int` Output only. Field indicating encryption state of CMEK backups. |
| `↳ backups_crypto_key_version` | `string` Output only. The crypto key version used to encrypt the backup vault. Format: `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` |

### getName

Identifier. The resource name of the backup vault.

Format:
`projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Identifier. The resource name of the backup vault.

Format:
`projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. The backup vault state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.State). |

### setState

Output only. The backup vault state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.State). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. Create time of the backup vault.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Create time of the backup vault.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDescription

Description of the backup vault.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDescription

Description of the backup vault.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Resource labels to represent user provided metadata.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Resource labels to represent user provided metadata.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBackupVaultType

Optional. Type of backup vault to be created.

Default is IN_REGION.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [BackupVaultType](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.BackupVaultType). |

### setBackupVaultType

Optional. Type of backup vault to be created.

Default is IN_REGION.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [BackupVaultType](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.BackupVaultType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceRegion

Output only. Region in which the backup vault is created.

Format: `projects/{project_id}/locations/{location}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSourceRegion

Output only. Region in which the backup vault is created.

Format: `projects/{project_id}/locations/{location}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBackupRegion

Optional. Region where the backups are stored.

Format: `projects/{project_id}/locations/{location}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setBackupRegion

Optional. Region where the backups are stored.

Format: `projects/{project_id}/locations/{location}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceBackupVault

Output only. Name of the Backup vault created in source region.

Format:
`projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSourceBackupVault

Output only. Name of the Backup vault created in source region.

Format:
`projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestinationBackupVault

Output only. Name of the Backup vault created in backup region.

Format:
`projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDestinationBackupVault

Output only. Name of the Backup vault created in backup region.

Format:
`projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBackupRetentionPolicy

Optional. Backup retention policy defining the retention of backups.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.BackupRetentionPolicy|null` |   |

### hasBackupRetentionPolicy

### clearBackupRetentionPolicy

### setBackupRetentionPolicy

Optional. Backup retention policy defining the retention of backups.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.BackupRetentionPolicy` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKmsConfig

Optional. Specifies the Key Management System (KMS) configuration to be
used for backup encryption. Format:
`projects/{project}/locations/{location}/kmsConfigs/{kms_config}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKmsConfig

Optional. Specifies the Key Management System (KMS) configuration to be
used for backup encryption. Format:
`projects/{project}/locations/{location}/kmsConfigs/{kms_config}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEncryptionState

Output only. Field indicating encryption state of CMEK backups.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EncryptionState](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.EncryptionState). |

### setEncryptionState

Output only. Field indicating encryption state of CMEK backups.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [EncryptionState](https://docs.cloud.google.com/php/docs/reference/cloud-netapp/latest/V1.BackupVault.EncryptionState). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBackupsCryptoKeyVersion

Output only. The crypto key version used to encrypt the backup vault.

Format:
`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setBackupsCryptoKeyVersion

Output only. The crypto key version used to encrypt the backup vault.

Format:
`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |