# Cloud Firestore V1 Client - Class BackupSchedule (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 BackupSchedule.

A backup schedule for a Cloud Firestore Database.

This resource is owned by the database it is backing up, and is deleted along
with the database. The actual backups are not though.

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

## 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 backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp at which this backup schedule was created and effective since. No backups will be created for this schedule before this time. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create_time. |
| `↳ retention` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks. |
| `↳ daily_recurrence` | `https://docs.cloud.google.com/php/docs/reference/cloud-firestore/latest/Admin.V1.DailyRecurrence` For a schedule that runs daily. |
| `↳ weekly_recurrence` | `https://docs.cloud.google.com/php/docs/reference/cloud-firestore/latest/Admin.V1.WeeklyRecurrence` For a schedule that runs weekly on a specific day. |

### getName

Output only. The unique backup schedule identifier across all locations and
databases for the given project.

This will be auto-assigned.
Format is
`projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`

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

### setName

Output only. The unique backup schedule identifier across all locations and
databases for the given project.

This will be auto-assigned.
Format is
`projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`

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

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

### getCreateTime

Output only. The timestamp at which this backup schedule was created and
effective since.

No backups will be created for this schedule before this time.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp at which this backup schedule was created and
effective since.

No backups will be created for this schedule before this time.

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

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

### getUpdateTime

Output only. The timestamp at which this backup schedule was most recently
updated. When a backup schedule is first created, this is the same as
create_time.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The timestamp at which this backup schedule was most recently
updated. When a backup schedule is first created, this is the same as
create_time.

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

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

### getRetention

At what relative time in the future, compared to its creation time,
the backup should be deleted, e.g. keep backups for 7 days.

The maximum supported retention period is 14 weeks.

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

### hasRetention

### clearRetention

### setRetention

At what relative time in the future, compared to its creation time,
the backup should be deleted, e.g. keep backups for 7 days.

The maximum supported retention period is 14 weeks.

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

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

### getDailyRecurrence

For a schedule that runs daily.

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

### hasDailyRecurrence

### setDailyRecurrence

For a schedule that runs daily.

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

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

### getWeeklyRecurrence

For a schedule that runs weekly on a specific day.

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

### hasWeeklyRecurrence

### setWeeklyRecurrence

For a schedule that runs weekly on a specific day.

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

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

### getRecurrence

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