# Google Cloud Database Center V1beta Client - Class MaintenanceInfo (0.7.0)

0.7.0 (latest) 0.6.0 0.5.0 0.4.1 0.3.1 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Database Center V1beta Client class MaintenanceInfo.

MaintenanceInfo to capture the maintenance details of database resource.

Generated from protobuf message `google.cloud.databasecenter.v1beta.MaintenanceInfo`

## Namespace

Google \\ Cloud \\ DatabaseCenter \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ maintenance_schedule` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceMaintenanceSchedule` Optional. Maintenance window for the database resource. |
| `↳ deny_maintenance_schedules` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceMaintenanceDenySchedule>` Optional. List of Deny maintenance period for the database resource. |
| `↳ maintenance_version` | `string` Output only. Current Maintenance version of the database resource. Example: "MYSQL_8_0_41.R20250531.01_15" |
| `↳ current_version_release_date` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` Output only. The date when the maintenance version was released. |
| `↳ upcoming_maintenance` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.UpcomingMaintenance` Output only. Upcoming maintenance window for the database resource. This is only populated for an engine, if upcoming maintenance is scheduled for the resource. This schedule is generated per engine and engine version, and there is only one upcoming maintenance window at any given time. In case of upcoming maintenance, the maintenance_state will be set to SCHEDULED first, and then IN_PROGRESS when the maintenance window starts. |
| `↳ state` | `int` Output only. Resource maintenance state. This is to capture the current state of the maintenance. |
| `↳ possible_failure_reasons` | `int[]` Output only. List of possible reasons why the maintenance is not completed. This is an optional field and is only populated if there are any reasons for failures recorded for the maintenance by DB Center. FAILURE maintenance status may not always have a failure reason. |
| `↳ previous_maintenance_version` | `string` Output only. Previous maintenance version of the database resource. Example: "MYSQL_8_0_41.R20250531.01_15". This is available once a minor version maintenance is complete on a database resource. |

### getMaintenanceSchedule

Optional. Maintenance window for the database resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceMaintenanceSchedule|null` |   |

### hasMaintenanceSchedule

### clearMaintenanceSchedule

### setMaintenanceSchedule

Optional. Maintenance window for the database resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceMaintenanceSchedule` |

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

### getDenyMaintenanceSchedules

Optional. List of Deny maintenance period for the database resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceMaintenanceDenySchedule>` |   |

### setDenyMaintenanceSchedules

Optional. List of Deny maintenance period for the database resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceMaintenanceDenySchedule>` |

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

### getMaintenanceVersion

Output only. Current Maintenance version of the database resource. Example:
"MYSQL_8_0_41.R20250531.01_15"

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

### setMaintenanceVersion

Output only. Current Maintenance version of the database resource. Example:
"MYSQL_8_0_41.R20250531.01_15"

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

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

### getCurrentVersionReleaseDate

Output only. The date when the maintenance version was released.

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

### hasCurrentVersionReleaseDate

### clearCurrentVersionReleaseDate

### setCurrentVersionReleaseDate

Output only. The date when the maintenance version was released.

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

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

### getUpcomingMaintenance

Output only. Upcoming maintenance window for the database resource. This is
only populated for an engine, if upcoming maintenance is scheduled for the
resource. This schedule is generated per engine and engine version, and
there is only one upcoming maintenance window at any given time. In case of
upcoming maintenance, the maintenance_state will be set to SCHEDULED first,
and then IN_PROGRESS when the maintenance window starts.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.UpcomingMaintenance|null` |   |

### hasUpcomingMaintenance

### clearUpcomingMaintenance

### setUpcomingMaintenance

Output only. Upcoming maintenance window for the database resource. This is
only populated for an engine, if upcoming maintenance is scheduled for the
resource. This schedule is generated per engine and engine version, and
there is only one upcoming maintenance window at any given time. In case of
upcoming maintenance, the maintenance_state will be set to SCHEDULED first,
and then IN_PROGRESS when the maintenance window starts.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.UpcomingMaintenance` |

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

### getState

Output only. Resource maintenance state. This is to capture the current
state of the maintenance.

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

### setState

Output only. Resource maintenance state. This is to capture the current
state of the maintenance.

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

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

### getPossibleFailureReasons

Output only. List of possible reasons why the maintenance is not completed.

This is an optional field and is only populated if there are any
reasons for failures recorded for the maintenance by DB Center.
FAILURE maintenance status may not always have a failure reason.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setPossibleFailureReasons

Output only. List of possible reasons why the maintenance is not completed.

This is an optional field and is only populated if there are any
reasons for failures recorded for the maintenance by DB Center.
FAILURE maintenance status may not always have a failure reason.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

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

### getPreviousMaintenanceVersion

Output only. Previous maintenance version of the database resource.

Example: "MYSQL_8_0_41.R20250531.01_15". This is available once a minor
version maintenance is complete on a database resource.

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

### setPreviousMaintenanceVersion

Output only. Previous maintenance version of the database resource.

Example: "MYSQL_8_0_41.R20250531.01_15". This is available once a minor
version maintenance is complete on a database resource.

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

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