# Google Cloud Backup Dr V1 Client - Class Backup (0.13.0)

0.13.0 (latest) 0.12.1 0.11.1 0.10.0 0.9.0 0.8.1 0.7.0 0.6.2 0.5.1 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Backup Dr V1 Client class Backup.

Message describing a Backup object.

Generated from protobuf message `google.cloud.backupdr.v1.Backup`

## Namespace

Google \\ Cloud \\ BackupDR \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. Name of the backup to create. It must have the format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`. `{backup}` cannot be changed after creation. It must be between 3-63 characters long and must be unique within the datasource. |
| `↳ description` | `string` Output only. The description of the Backup instance (2048 characters or less). |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the instance was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the instance was updated. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Resource labels to represent user provided metadata. No labels currently defined. |
| `↳ enforced_retention_end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. The backup can not be deleted before this time. |
| `↳ backup_retention_inheritance` | `int` Output only. Setting for how the enforced retention end time is inherited. This value is copied from this backup's BackupVault. |
| `↳ expire_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. When this backup is automatically expired. |
| `↳ consistency_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The point in time when this backup was captured from the source. |
| `↳ etag` | `string` Optional. Server specified ETag to prevent updates from overwriting each other. |
| `↳ state` | `int` Output only. The Backup resource instance state. |
| `↳ service_locks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupLock>` Output only. The list of BackupLocks taken by the service to prevent the deletion of the backup. |
| `↳ backup_appliance_locks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupLock>` Optional. The list of BackupLocks taken by the accessor Backup Appliance. |
| `↳ compute_instance_backup_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.ComputeInstanceBackupProperties` Output only. Compute Engine specific backup properties. |
| `↳ cloud_sql_instance_backup_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.CloudSqlInstanceBackupProperties` Output only. Cloud SQL specific backup properties. |
| `↳ backup_appliance_backup_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupApplianceBackupProperties` Output only. Backup Appliance specific backup properties. |
| `↳ alloy_db_backup_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.AlloyDbClusterBackupProperties` Output only. AlloyDB specific backup properties. |
| `↳ disk_backup_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.DiskBackupProperties` Output only. Disk specific backup properties. |
| `↳ backup_type` | `int` Output only. Type of the backup, unspecified, scheduled or ondemand. |
| `↳ gcp_backup_plan_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.Backup.GCPBackupPlanInfo` Output only. Configuration for a Google Cloud resource. |
| `↳ resource_size_bytes` | `int|string` Output only. source resource size in bytes at the time of the backup. |
| `↳ satisfies_pzs` | `bool` Optional. Output only. Reserved for future use. |
| `↳ satisfies_pzi` | `bool` Optional. Output only. Reserved for future use. |
| `↳ gcp_resource` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupGcpResource` Output only. Unique identifier of the GCP resource that is being backed up. |
| `↳ kms_key_versions` | `string[]` Optional. Output only. The list of KMS key versions used to encrypt the backup. |

### getName

Output only. Identifier. Name of the backup to create. It must have the
format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.

`{backup}` cannot be changed after creation. It must be between 3-63
characters long and must be unique within the datasource.

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

### setName

Output only. Identifier. Name of the backup to create. It must have the
format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.

`{backup}` cannot be changed after creation. It must be between 3-63
characters long and must be unique within the datasource.

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

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

### getDescription

Output only. The description of the Backup instance (2048 characters or
less).

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

### hasDescription

### clearDescription

### setDescription

Output only. The description of the Backup instance (2048 characters or
less).

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

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

### getCreateTime

Output only. The time when the instance was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the instance was created.

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

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

### getUpdateTime

Output only. The time when the instance was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time when the instance was updated.

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

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

### getLabels

Optional. Resource labels to represent user provided metadata.

No labels currently defined.

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

### setLabels

Optional. Resource labels to represent user provided metadata.

No labels currently defined.

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

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

### getEnforcedRetentionEndTime

Optional. The backup can not be deleted before this time.

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

### hasEnforcedRetentionEndTime

### clearEnforcedRetentionEndTime

### setEnforcedRetentionEndTime

Optional. The backup can not be deleted before this time.

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

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

### getBackupRetentionInheritance

Output only. Setting for how the enforced retention end time is inherited.

This value is copied from this backup's BackupVault.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasBackupRetentionInheritance

### clearBackupRetentionInheritance

### setBackupRetentionInheritance

Output only. Setting for how the enforced retention end time is inherited.

This value is copied from this backup's BackupVault.

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

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

### getExpireTime

Optional. When this backup is automatically expired.

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

### hasExpireTime

### clearExpireTime

### setExpireTime

Optional. When this backup is automatically expired.

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

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

### getConsistencyTime

Output only. The point in time when this backup was captured from the
source.

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

### hasConsistencyTime

### clearConsistencyTime

### setConsistencyTime

Output only. The point in time when this backup was captured from the
source.

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

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

### getEtag

Optional. Server specified ETag to prevent updates from overwriting each
other.

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

### hasEtag

### clearEtag

### setEtag

Optional. Server specified ETag to prevent updates from overwriting each
other.

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

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

### getState

Output only. The Backup resource instance state.

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

### setState

Output only. The Backup resource instance state.

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

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

### getServiceLocks

Output only. The list of BackupLocks taken by the service to prevent the
deletion of the backup.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupLock>` |   |

### setServiceLocks

Output only. The list of BackupLocks taken by the service to prevent the
deletion of the backup.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupLock>` |

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

### getBackupApplianceLocks

Optional. The list of BackupLocks taken by the accessor Backup Appliance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupLock>` |   |

### setBackupApplianceLocks

Optional. The list of BackupLocks taken by the accessor Backup Appliance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupLock>` |

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

### getComputeInstanceBackupProperties

Output only. Compute Engine specific backup properties.

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

### hasComputeInstanceBackupProperties

### setComputeInstanceBackupProperties

Output only. Compute Engine specific backup properties.

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

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

### getCloudSqlInstanceBackupProperties

Output only. Cloud SQL specific backup properties.

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

### hasCloudSqlInstanceBackupProperties

### setCloudSqlInstanceBackupProperties

Output only. Cloud SQL specific backup properties.

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

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

### getBackupApplianceBackupProperties

Output only. Backup Appliance specific backup properties.

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

### hasBackupApplianceBackupProperties

### setBackupApplianceBackupProperties

Output only. Backup Appliance specific backup properties.

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

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

### getAlloyDbBackupProperties

Output only. AlloyDB specific backup properties.

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

### hasAlloyDbBackupProperties

### setAlloyDbBackupProperties

Output only. AlloyDB specific backup properties.

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

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

### getDiskBackupProperties

Output only. Disk specific backup properties.

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

### hasDiskBackupProperties

### setDiskBackupProperties

Output only. Disk specific backup properties.

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

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

### getBackupType

Output only. Type of the backup, unspecified, scheduled or ondemand.

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

### setBackupType

Output only. Type of the backup, unspecified, scheduled or ondemand.

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

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

### getGcpBackupPlanInfo

Output only. Configuration for a Google Cloud resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.Backup.GCPBackupPlanInfo|null` |   |

### hasGcpBackupPlanInfo

### setGcpBackupPlanInfo

Output only. Configuration for a Google Cloud resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.Backup.GCPBackupPlanInfo` |

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

### getResourceSizeBytes

Output only. source resource size in bytes at the time of the backup.

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

### setResourceSizeBytes

Output only. source resource size in bytes at the time of the backup.

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

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

### getSatisfiesPzs

Optional. Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzs

### clearSatisfiesPzs

### setSatisfiesPzs

Optional. Output only. Reserved for future use.

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

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

### getSatisfiesPzi

Optional. Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzi

### clearSatisfiesPzi

### setSatisfiesPzi

Optional. Output only. Reserved for future use.

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

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

### getGcpResource

Output only. Unique identifier of the GCP resource that is being backed
up.

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

### hasGcpResource

### setGcpResource

Output only. Unique identifier of the GCP resource that is being backed
up.

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

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

### getKmsKeyVersions

Optional. Output only. The list of KMS key versions used to encrypt the
backup.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setKmsKeyVersions

Optional. Output only. The list of KMS key versions used to encrypt the
backup.

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

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

### getBackupProperties

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

### getPlanInfo

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

### getSourceResource

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