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

A collection of data points that describes the time-varying values of a
resource. A time series is identified by its ID.

Next : 13

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ location_type` | `int` Required. The type of location that the time series is summarizing. |
| `↳ location` | `string` Optional. The location of the usage data in time series. |
| `↳ is_spot` | `bool` Optional. The location of the usage data in time series. |
| `↳ machine_family` | `string` The machine family for the time series values to return. Possible values include "n1" and "n2d". |
| `↳ disk_type` | `string` The disk type for the time series values to return. |
| `↳ confidential_mode` | `bool` Optional. The confidential mode for disk. |
| `↳ gpu_type` | `string` The GPU type of the time series. |
| `↳ tpu_type` | `string` The TPU type of the time series. |
| `↳ machine_shape` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.MachineShape` The machine shape of the time series. |
| `↳ cloud_resource_type` | `string` The resource for the time series values to return. Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu", "gce-tpu" and "gce-vm". |
| `↳ points` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.Point>` The data points of this time series. When listing time series, points are returned in chronological order. |
| `↳ unit` | `string` The units in which the values are reported. |

### getLocationType

Required. The type of location that the time series is summarizing.

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

### setLocationType

Required. The type of location that the time series is summarizing.

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

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

### getLocation

Optional. The location of the usage data in time series.

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

### setLocation

Optional. The location of the usage data in time series.

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

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

### getIsSpot

Optional. The location of the usage data in time series.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setIsSpot

Optional. The location of the usage data in time series.

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

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

### getMachineFamily

The machine family for the time series values to return. Possible values
include "n1" and "n2d".

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

### setMachineFamily

The machine family for the time series values to return. Possible values
include "n1" and "n2d".

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

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

### getDiskType

The disk type for the time series values to return.

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

### setDiskType

The disk type for the time series values to return.

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

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

### getConfidentialMode

Optional. The confidential mode for disk.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setConfidentialMode

Optional. The confidential mode for disk.

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

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

### getGpuType

The GPU type of the time series.

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

### setGpuType

The GPU type of the time series.

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

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

### getTpuType

The TPU type of the time series.

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

### setTpuType

The TPU type of the time series.

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

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

### getMachineShape

The machine shape of the time series.

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

### hasMachineShape

### clearMachineShape

### setMachineShape

The machine shape of the time series.

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

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

### getCloudResourceType

The resource for the time series values to return. Possible values include
"gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu",
"gce-tpu" and "gce-vm".

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

### setCloudResourceType

The resource for the time series values to return. Possible values include
"gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu",
"gce-tpu" and "gce-vm".

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

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

### getPoints

The data points of this time series. When listing time series, points are
returned in chronological order.

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

### setPoints

The data points of this time series. When listing time series, points are
returned in chronological order.

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

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

### getUnit

The units in which the values are reported.

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

### setUnit

The units in which the values are reported.

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

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