# Google Cloud Capacity Planner V1beta Client - Class DemandValue (0.1.2)

0.1.2 (latest) 0.1.1

> [!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 Capacity Planner V1beta Client class DemandValue.

Capacity demand value for a single resource attribute such as CPU count,
vertex AI peak QPM, etc.

Generated from protobuf message `google.cloud.capacityplanner.v1beta.DemandValue`

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the demand value such as CPU count. |
| `↳ time_values` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.TimeValue>` Required. The demand values at different time points. |
| `↳ unit` | `int` Required. Unit of measurement. |

### getName

Required. The name of the demand value such as CPU count.

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

### setName

Required. The name of the demand value such as CPU count.

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

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

### getTimeValues

Required. The demand values at different time points.

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

### setTimeValues

Required. The demand values at different time points.

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

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

### getUnit

Required. Unit of measurement.

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

### setUnit

Required. Unit of measurement.

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

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