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

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

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name of the connection in the form of: `projects/{project_id}/locations/{location_id}/forecasts/{forecast_id}` or `organizations/{organization_id}/locations/{location_id}/forecasts/{forecast_id}` or `folders/{folder_id}/locations/{location_id}/forecasts/{forecast_id}` |
| `↳ time_series` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.TimeSeries` The collection of data points that represent the predicted values. Note that some of these values may be in the past (if, for example, the forecast was created in the past and predicted values for the present day). |
| `↳ forecast_type` | `int` The type of forecast. |
| `↳ bounds` | `int` The bounds represented by this forecast time series. |
| `↳ prediction_interval` | `int` The prediction interval represented by the time series. |
| `↳ aggregation_method` | `int` Aggregation Method of the historical usage for which the forecast is generated |

### getName

The resource name of the connection in the form of:
`projects/{project_id}/locations/{location_id}/forecasts/{forecast_id}` or
`organizations/{organization_id}/locations/{location_id}/forecasts/{forecast_id}`
or `folders/{folder_id}/locations/{location_id}/forecasts/{forecast_id}`

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

### setName

The resource name of the connection in the form of:
`projects/{project_id}/locations/{location_id}/forecasts/{forecast_id}` or
`organizations/{organization_id}/locations/{location_id}/forecasts/{forecast_id}`
or `folders/{folder_id}/locations/{location_id}/forecasts/{forecast_id}`

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

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

### getTimeSeries

The collection of data points that represent the predicted values. Note
that some of these values may be in the past (if, for example, the forecast
was created in the past and predicted values for the present day).

| **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 predicted values. Note
that some of these values may be in the past (if, for example, the forecast
was created in the past and predicted values for the present day).

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

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

### getForecastType

The type of forecast.

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

### setForecastType

The type of forecast.

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

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

### getBounds

The bounds represented by this forecast time series.

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

### setBounds

The bounds represented by this forecast time series.

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

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

### getPredictionInterval

The prediction interval represented by the time series.

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

### setPredictionInterval

The prediction interval represented by the time series.

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

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

### getAggregationMethod

Aggregation Method of the historical usage for which the forecast is
generated

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

### setAggregationMethod

Aggregation Method of the historical usage for which the forecast is
generated

| **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` |   |