1.8.4 (latest) 1.7.1 1.6.3 1.5.0 1.4.1 1.3.0 1.2.0 1.1.3 1.0.0 0.10.3 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.3 Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client class Backup.

Message describing Backup object

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

## Namespace

Google \\ Cloud \\ AlloyDb \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The name of the backup resource with the format: \* \* projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see <https://google.aip.dev/122>. The prefix of the backup resource name is the name of the parent resource: \* \* projects/{project}/locations/{region} |
| `↳ display_name` | `string` User-settable and human-readable display name for the Backup. |
| `↳ uid` | `string` Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. |
| `↳ create_time` | `Google\Protobuf\Timestamp` Output only. Create time stamp |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. Update time stamp Users should not infer any meaning from this field. Its value is generally unrelated to the timing of the backup creation operation. |
| `↳ delete_time` | `Google\Protobuf\Timestamp` Output only. Delete time stamp |
| `↳ create_completion_time` | `Google\Protobuf\Timestamp` Output only. Timestamp when the resource finished being created. |
| `↳ labels` | `array|Google\Protobuf\Internal\MapField` Labels as key value pairs |
| `↳ state` | `int` Output only. The current state of the backup. |
| `↳ type` | `int` The backup type, which suggests the trigger for the backup. |
| `↳ description` | `string` User-provided description of the backup. |
| `↳ cluster_uid` | `string` Output only. The system-generated UID of the cluster which was used to create this resource. |
| `↳ cluster_name` | `string` Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}). |
| `↳ reconciling` | `bool` Output only. Reconciling (<https://google.aip.dev/128#reconciliation>), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance. |
| `↳ encryption_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-alloydb/latest/V1.EncryptionConfig` Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data. |
| `↳ encryption_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-alloydb/latest/V1.EncryptionInfo` Output only. The encryption information for the backup. |
| `↳ etag` | `string` For Resource freshness validation (<https://google.aip.dev/154>) |
| `↳ annotations` | `array|Google\Protobuf\Internal\MapField` Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. <https://google.aip.dev/128> |
| `↳ size_bytes` | `int|string` Output only. The size of the backup in bytes. |
| `↳ expiry_time` | `Google\Protobuf\Timestamp` Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time. |
| `↳ expiry_quantity` | `https://docs.cloud.google.com/php/docs/reference/cloud-alloydb/latest/V1.Backup.QuantityBasedExpiry` Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected. |
| `↳ satisfies_pzs` | `bool` Output only. Reserved for future use. |
| `↳ database_version` | `int` Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version. |
| `↳ tags` | `array|Google\Protobuf\Internal\MapField` Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: `"123/environment": "production", "123/costCenter": "marketing"` |

### getName

Output only. The name of the backup resource with the format:

- projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see <https://google.aip.dev/122>.

The prefix of the backup resource name is the name of the parent
resource:

- projects/{project}/locations/{region}

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

### setName

Output only. The name of the backup resource with the format:

- projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see <https://google.aip.dev/122>.

The prefix of the backup resource name is the name of the parent
resource:

- projects/{project}/locations/{region}

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

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

### getDisplayName

User-settable and human-readable display name for the Backup.

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

### setDisplayName

User-settable and human-readable display name for the Backup.

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

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

### getUid

Output only. The system-generated UID of the resource. The UID is assigned
when the resource is created, and it is retained until it is deleted.

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

### setUid

Output only. The system-generated UID of the resource. The UID is assigned
when the resource is created, and it is retained until it is deleted.

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

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

### getCreateTime

Output only. Create time stamp

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Create time stamp

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUpdateTime

Output only. Update time stamp
Users should not infer any meaning from this field. Its value is generally
unrelated to the timing of the backup creation operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Update time stamp
Users should not infer any meaning from this field. Its value is generally
unrelated to the timing of the backup creation operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getDeleteTime

Output only. Delete time stamp

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasDeleteTime

### clearDeleteTime

### setDeleteTime

Output only. Delete time stamp

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getCreateCompletionTime

Output only. Timestamp when the resource finished being created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateCompletionTime

### clearCreateCompletionTime

### setCreateCompletionTime

Output only. Timestamp when the resource finished being created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getLabels

Labels as key value pairs

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setLabels

Labels as key value pairs

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getState

Output only. The current state of the backup.

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

### setState

Output only. The current state of the backup.

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

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

### getType

The backup type, which suggests the trigger for the backup.

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

### setType

The backup type, which suggests the trigger for the backup.

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

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

### getDescription

User-provided description of the backup.

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

### setDescription

User-provided description of the backup.

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

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

### getClusterUid

Output only. The system-generated UID of the cluster which was used to
create this resource.

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

### setClusterUid

Output only. The system-generated UID of the cluster which was used to
create this resource.

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

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

### getClusterName

Required. The full resource name of the backup source cluster
(e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).

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

### setClusterName

Required. The full resource name of the backup source cluster
(e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).

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

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

### getReconciling

Output only. Reconciling (<https://google.aip.dev/128#reconciliation>), if
true, indicates that the service is actively updating the resource. This
can happen due to user-triggered updates or system actions like failover or
maintenance.

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

### setReconciling

Output only. Reconciling (<https://google.aip.dev/128#reconciliation>), if
true, indicates that the service is actively updating the resource. This
can happen due to user-triggered updates or system actions like failover or
maintenance.

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

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

### getEncryptionConfig

Optional. The encryption config can be specified to encrypt the
backup with a customer-managed encryption key (CMEK). When this field is
not specified, the backup will then use default encryption scheme to
protect the user data.

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

### hasEncryptionConfig

### clearEncryptionConfig

### setEncryptionConfig

Optional. The encryption config can be specified to encrypt the
backup with a customer-managed encryption key (CMEK). When this field is
not specified, the backup will then use default encryption scheme to
protect the user data.

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

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

### getEncryptionInfo

Output only. The encryption information for the backup.

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

### hasEncryptionInfo

### clearEncryptionInfo

### setEncryptionInfo

Output only. The encryption information for the backup.

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

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

### getEtag

For Resource freshness validation (<https://google.aip.dev/154>)

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

### setEtag

For Resource freshness validation (<https://google.aip.dev/154>)

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

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

### getAnnotations

Annotations to allow client tools to store small amount of arbitrary data.

This is distinct from labels.
<https://google.aip.dev/128>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setAnnotations

Annotations to allow client tools to store small amount of arbitrary data.

This is distinct from labels.
<https://google.aip.dev/128>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getSizeBytes

Output only. The size of the backup in bytes.

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

### setSizeBytes

Output only. The size of the backup in bytes.

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

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

### getExpiryTime

Output only. The time at which after the backup is eligible to be garbage
collected. It is the duration specified by the backup's retention policy,
added to the backup's create_time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasExpiryTime

### clearExpiryTime

### setExpiryTime

Output only. The time at which after the backup is eligible to be garbage
collected. It is the duration specified by the backup's retention policy,
added to the backup's create_time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getExpiryQuantity

Output only. The QuantityBasedExpiry of the backup, specified by the
backup's retention policy. Once the expiry quantity is over retention, the
backup is eligible to be garbage collected.

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

### hasExpiryQuantity

### clearExpiryQuantity

### setExpiryQuantity

Output only. The QuantityBasedExpiry of the backup, specified by the
backup's retention policy. Once the expiry quantity is over retention, the
backup is eligible to be garbage collected.

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

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

### getSatisfiesPzs

Output only. Reserved for future use.

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

### setSatisfiesPzs

Output only. Reserved for future use.

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

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

### getDatabaseVersion

Output only. The database engine major version of the cluster this backup
was created from. Any restored cluster created from this backup will have
the same database version.

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

### setDatabaseVersion

Output only. The database engine major version of the cluster this backup
was created from. Any restored cluster created from this backup will have
the same database version.

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

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

### getTags

Optional. Input only. Immutable. Tag keys/values directly bound to this
resource. For example:

    "123/environment": "production",
    "123/costCenter": "marketing"

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setTags

Optional. Input only. Immutable. Tag keys/values directly bound to this
resource. For example:

    "123/environment": "production",
    "123/costCenter": "marketing"

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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