# Cloud Firestore V1 Client - Class Backup (2.2.0-RC1)

2.2.0-RC1 2.1.0 (latest) 2.0.2-RC1 1.55.0 1.54.4 1.53.1 1.52.0 1.51.0 1.50.0 1.48.1 1.47.3 1.46.0 1.45.2 1.44.1 1.43.3 1.40.0 1.39.0 1.38.0 1.37.7 1.36.1 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.28.0 1.27.3 Reference documentation and code samples for the Cloud Firestore V1 Client class Backup.

A Backup of a Cloud Firestore Database.

The backup contains all documents and index configurations for the given
database at a specific point in time.

Generated from protobuf message `google.firestore.admin.v1.Backup`

## Namespace

Google \\ Cloud \\ Firestore \\ Admin \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The unique resource name of the Backup. Format is `projects/{project}/locations/{location}/backups/{backup}`. |
| `↳ database` | `string` Output only. Name of the Firestore database that the backup is from. Format is `projects/{project}/databases/{database}`. |
| `↳ database_uid` | `string` Output only. The system-generated UUID4 for the Firestore database that the backup is from. |
| `↳ snapshot_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The backup contains an externally consistent copy of the database at this time. |
| `↳ expire_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp at which this backup expires. |
| `↳ stats` | `https://docs.cloud.google.com/php/docs/reference/cloud-firestore/latest/Admin.V1.Backup.Stats` Output only. Statistics about the backup. This data only becomes available after the backup is fully materialized to secondary storage. This field will be empty till then. |
| `↳ state` | `int` Output only. The current state of the backup. |

### getName

Output only. The unique resource name of the Backup.

Format is `projects/{project}/locations/{location}/backups/{backup}`.

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

### setName

Output only. The unique resource name of the Backup.

Format is `projects/{project}/locations/{location}/backups/{backup}`.

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

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

### getDatabase

Output only. Name of the Firestore database that the backup is from.

Format is `projects/{project}/databases/{database}`.

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

### setDatabase

Output only. Name of the Firestore database that the backup is from.

Format is `projects/{project}/databases/{database}`.

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

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

### getDatabaseUid

Output only. The system-generated UUID4 for the Firestore database that the
backup is from.

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

### setDatabaseUid

Output only. The system-generated UUID4 for the Firestore database that the
backup is from.

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

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

### getSnapshotTime

Output only. The backup contains an externally consistent copy of the
database at this time.

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

### hasSnapshotTime

### clearSnapshotTime

### setSnapshotTime

Output only. The backup contains an externally consistent copy of the
database at this time.

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

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

### getExpireTime

Output only. The timestamp at which this backup expires.

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

### hasExpireTime

### clearExpireTime

### setExpireTime

Output only. The timestamp at which this backup expires.

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

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

### getStats

Output only. Statistics about the backup.

This data only becomes available after the backup is fully materialized to
secondary storage. This field will be empty till then.

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

### hasStats

### clearStats

### setStats

Output only. Statistics about the backup.

This data only becomes available after the backup is fully materialized to
secondary storage. This field will be empty till then.

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

| **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-firestore/latest/Admin.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-firestore/latest/Admin.V1.Backup.State). |

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