# Google Cloud Sql Admin V1 Client - Class MaintenanceWindow (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class MaintenanceWindow.

Maintenance window. This specifies when a Cloud SQL instance is
restarted for system maintenance purposes.

Generated from protobuf message `google.cloud.sql.v1.MaintenanceWindow`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ hour` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` Hour of day - 0 to 23. Specify in the UTC time zone. |
| `↳ day` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. Returned in output as an integer, 1 to 7, where `1` equals Monday. |
| `↳ update_track` | `int` Maintenance timing settings: `canary`, `stable`, or `week5`. For more information, see [About maintenance on Cloud SQL instances](https://cloud.google.com/sql/docs/mysql/maintenance). |
| `↳ kind` | `string` This is always `sql#maintenanceWindow`. |

### getHour

Hour of day - 0 to 23. Specify in the UTC time zone.

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

### hasHour

### clearHour

### getHourUnwrapped

Returns the unboxed value from `getHour()`

Hour of day - 0 to 23. Specify in the UTC time zone.

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

### setHour

Hour of day - 0 to 23. Specify in the UTC time zone.

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

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

### setHourUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

Hour of day - 0 to 23. Specify in the UTC time zone.

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

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

### getDay

Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`,
`SATURDAY`, or `SUNDAY`. Specify in the UTC time zone.

Returned in output as an integer, 1 to 7, where `1` equals Monday.

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

### hasDay

### clearDay

### getDayUnwrapped

Returns the unboxed value from `getDay()`

Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`,
`SATURDAY`, or `SUNDAY`. Specify in the UTC time zone.
Returned in output as an integer, 1 to 7, where `1` equals Monday.

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

### setDay

Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`,
`SATURDAY`, or `SUNDAY`. Specify in the UTC time zone.

Returned in output as an integer, 1 to 7, where `1` equals Monday.

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

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

### setDayUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`,
`SATURDAY`, or `SUNDAY`. Specify in the UTC time zone.
Returned in output as an integer, 1 to 7, where `1` equals Monday.

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

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

### getUpdateTrack

Maintenance timing settings: `canary`, `stable`, or `week5`.

For more information, see [About maintenance on Cloud SQL
instances](https://cloud.google.com/sql/docs/mysql/maintenance).

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

### setUpdateTrack

Maintenance timing settings: `canary`, `stable`, or `week5`.

For more information, see [About maintenance on Cloud SQL
instances](https://cloud.google.com/sql/docs/mysql/maintenance).

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

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

### getKind

This is always `sql#maintenanceWindow`.

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

### setKind

This is always `sql#maintenanceWindow`.

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

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