# Google Cloud Capacity Planner V1beta Client - Class UsageHistory (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 UsageHistory.

A collection of data points that describes the historical time-varying values
of a resource.

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ time_series` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.TimeSeries` The collection of data points that represent the historical values. |
| `↳ aggregation_method` | `int` Method used to convert sampled usage data to time series values. |

### getTimeSeries

The collection of data points that represent the historical values.

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

### hasTimeSeries

### clearTimeSeries

### setTimeSeries

The collection of data points that represent the historical values.

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

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

### getAggregationMethod

Method used to convert sampled usage data to time series values.

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

### setAggregationMethod

Method used to convert sampled usage data to time series values.

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

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