# Google Cloud Database Center V1beta Client - Class MetricData (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 MetricData.

MetricData represents the metric data for a database resource.

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

## Namespace

Google \\ Cloud \\ DatabaseCenter \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ value` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.TypedValue` The value associated with the metric. |
| `↳ observation_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time the metric was observed in the metric source service. |

### getValue

The value associated with the metric.

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

### hasValue

### clearValue

### setValue

The value associated with the metric.

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

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

### getObservationTime

The time the metric was observed in the metric source service.

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

### hasObservationTime

### clearObservationTime

### setObservationTime

The time the metric was observed in the metric source service.

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

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