# Google Cloud Storage Transfer V1 Client - Class Schedule (2.4.0)

2.4.0 (latest) 2.3.2 2.2.1 2.1.1 2.0.2 1.5.0 1.4.5 1.3.1 1.2.0 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Storage Transfer V1 Client class Schedule.

Transfers can be scheduled to recur or to run just once.

Generated from protobuf message `google.storagetransfer.v1.Schedule`

## Namespace

Google \\ Cloud \\ StorageTransfer \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ schedule_start_date` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` Required. The start date of a transfer. Date boundaries are determined relative to UTC time. If `schedule_start_date` and [start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__) are in the past relative to the job's creation time, the transfer starts the day after you schedule the transfer request. **Note:** When starting jobs at or near midnight UTC it is possible that a job starts later than expected. For example, if you send an outbound request on June 1 one millisecond prior to midnight UTC and the Storage Transfer Service server receives the request on June 2, then it creates a TransferJob with `schedule_start_date` set to June 2 and a `start_time_of_day` set to midnight UTC. The first scheduled [TransferOperation](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOperation) takes place on June 3 at midnight UTC. |
| `↳ schedule_end_date` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` The last day a transfer runs. Date boundaries are determined relative to UTC time. A job runs once per 24 hours within the following guidelines: \* \* If `schedule_end_date` and [schedule_start_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleStartDate__) are the same and in the future relative to UTC, the transfer is executed only one time. \* \* If `schedule_end_date` is later than `schedule_start_date` and `schedule_end_date` is in the future relative to UTC, the job runs each day at [start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__) through `schedule_end_date`. |
| `↳ start_time_of_day` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html` The time in UTC that a transfer job is scheduled to run. Transfers may start later than this time. If `start_time_of_day` is not specified: \* \* One-time transfers run immediately. \* \* Recurring transfers run immediately, and each day at midnight UTC, through [schedule_end_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleEndDate__). If `start_time_of_day` is specified: \* \* One-time transfers run at the specified time. \* \* Recurring transfers run at the specified time each day, through `schedule_end_date`. |
| `↳ end_time_of_day` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html` The time in UTC that no further transfer operations are scheduled. Combined with [schedule_end_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleEndDate__), `end_time_of_day` specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the combination of [schedule_start_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleStartDate__) and [start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__), and is subject to the following: \* \* If `end_time_of_day` is not set and `schedule_end_date` is set, then a default value of `23:59:59` is used for `end_time_of_day`. \* \* If `end_time_of_day` is set and `schedule_end_date` is not set, then [INVALID_ARGUMENT](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__INVALID_ARGUMENT) is returned. |
| `↳ repeat_interval` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Interval between the start of each scheduled TransferOperation. If unspecified, the default value is 24 hours. This value may not be less than 1 hour. |

### getScheduleStartDate

Required. The start date of a transfer. Date boundaries are determined
relative to UTC time. If `schedule_start_date` and
[start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__)
are in the past relative to the job's creation time, the transfer starts
the day after you schedule the transfer request.

**Note:** When starting jobs at or near midnight UTC it is possible that
a job starts later than expected. For example, if you send an outbound
request on June 1 one millisecond prior to midnight UTC and the Storage
Transfer Service server receives the request on June 2, then it creates
a TransferJob with `schedule_start_date` set to June 2 and a
`start_time_of_day` set to midnight UTC. The first scheduled
[TransferOperation](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOperation) takes
place on June 3 at midnight UTC.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html|null` |   |

### hasScheduleStartDate

### clearScheduleStartDate

### setScheduleStartDate

Required. The start date of a transfer. Date boundaries are determined
relative to UTC time. If `schedule_start_date` and
[start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__)
are in the past relative to the job's creation time, the transfer starts
the day after you schedule the transfer request.

**Note:** When starting jobs at or near midnight UTC it is possible that
a job starts later than expected. For example, if you send an outbound
request on June 1 one millisecond prior to midnight UTC and the Storage
Transfer Service server receives the request on June 2, then it creates
a TransferJob with `schedule_start_date` set to June 2 and a
`start_time_of_day` set to midnight UTC. The first scheduled
[TransferOperation](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.TransferOperation) takes
place on June 3 at midnight UTC.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` |

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

### getScheduleEndDate

The last day a transfer runs. Date boundaries are determined relative to
UTC time. A job runs once per 24 hours within the following guidelines:

- If `schedule_end_date` and
  [schedule_start_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleStartDate__)
  are the same and in
  the future relative to UTC, the transfer is executed only one time.

- If `schedule_end_date` is later than `schedule_start_date` and
  `schedule_end_date` is in the future relative to UTC, the job runs each
  day at
  [start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__)
  through `schedule_end_date`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html|null` |   |

### hasScheduleEndDate

### clearScheduleEndDate

### setScheduleEndDate

The last day a transfer runs. Date boundaries are determined relative to
UTC time. A job runs once per 24 hours within the following guidelines:

- If `schedule_end_date` and
  [schedule_start_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleStartDate__)
  are the same and in
  the future relative to UTC, the transfer is executed only one time.

- If `schedule_end_date` is later than `schedule_start_date` and
  `schedule_end_date` is in the future relative to UTC, the job runs each
  day at
  [start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__)
  through `schedule_end_date`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` |

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

### getStartTimeOfDay

The time in UTC that a transfer job is scheduled to run. Transfers may
start later than this time.

If `start_time_of_day` is not specified:

- One-time transfers run immediately.
- Recurring transfers run immediately, and each day at midnight UTC, through [schedule_end_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleEndDate__). If `start_time_of_day` is specified:
- One-time transfers run at the specified time.
- Recurring transfers run at the specified time each day, through `schedule_end_date`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html|null` |   |

### hasStartTimeOfDay

### clearStartTimeOfDay

### setStartTimeOfDay

The time in UTC that a transfer job is scheduled to run. Transfers may
start later than this time.

If `start_time_of_day` is not specified:

- One-time transfers run immediately.
- Recurring transfers run immediately, and each day at midnight UTC, through [schedule_end_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleEndDate__). If `start_time_of_day` is specified:
- One-time transfers run at the specified time.
- Recurring transfers run at the specified time each day, through `schedule_end_date`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html` |

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

### getEndTimeOfDay

The time in UTC that no further transfer operations are scheduled. Combined
with
[schedule_end_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleEndDate__),
`end_time_of_day` specifies the end date and time for starting new transfer
operations. This field must be greater than or equal to the timestamp
corresponding to the combination of
[schedule_start_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleStartDate__)
and
[start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__),
and is subject to the following:

- If `end_time_of_day` is not set and `schedule_end_date` is set, then
  a default value of `23:59:59` is used for `end_time_of_day`.

- If `end_time_of_day` is set and `schedule_end_date` is not set, then
  [INVALID_ARGUMENT](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__INVALID_ARGUMENT) is returned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html|null` |   |

### hasEndTimeOfDay

### clearEndTimeOfDay

### setEndTimeOfDay

The time in UTC that no further transfer operations are scheduled. Combined
with
[schedule_end_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleEndDate__),
`end_time_of_day` specifies the end date and time for starting new transfer
operations. This field must be greater than or equal to the timestamp
corresponding to the combination of
[schedule_start_date](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getScheduleStartDate__)
and
[start_time_of_day](https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.Schedule#_Google_Cloud_StorageTransfer_V1_Schedule__getStartTimeOfDay__),
and is subject to the following:

- If `end_time_of_day` is not set and `schedule_end_date` is set, then
  a default value of `23:59:59` is used for `end_time_of_day`.

- If `end_time_of_day` is set and `schedule_end_date` is not set, then
  [INVALID_ARGUMENT](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html#_Google_Rpc_Code__INVALID_ARGUMENT) is returned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.TimeOfDay.html` |

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

### getRepeatInterval

Interval between the start of each scheduled TransferOperation. If
unspecified, the default value is 24 hours. This value may not be less than
1 hour.

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

### hasRepeatInterval

### clearRepeatInterval

### setRepeatInterval

Interval between the start of each scheduled TransferOperation. If
unspecified, the default value is 24 hours. This value may not be less than
1 hour.

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

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