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

A plan for additional capacity needed by a Google Cloud Platform project.

This is synonymous with CapacityDemand, CapacityRequest, and
CapacityDemandRequest.

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The name of the capacity plan. Format: projects/{project}/capacityPlans/{capacity_plan_id} |
| `↳ capacity_demand_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.DemandMetadata` Optional. The metadata associated with a capacity demand. |
| `↳ service_demands` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.ServiceDemand>` Required. The capacity demand associated with a service. |
| `↳ reporter` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.User` Output only. User who created the capacity plan. |
| `↳ state` | `int` Output only. State of the plan. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the plan was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the plan was last updated. |
| `↳ description` | `string` Optional. Description of the plan. |
| `↳ title` | `string` Optional. Title of the plan. |

### getName

Identifier. The name of the capacity plan.

Format:
projects/{project}/capacityPlans/{capacity_plan_id}

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

### setName

Identifier. The name of the capacity plan.

Format:
projects/{project}/capacityPlans/{capacity_plan_id}

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

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

### getCapacityDemandMetadata

Optional. The metadata associated with a capacity demand.

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

### hasCapacityDemandMetadata

### clearCapacityDemandMetadata

### setCapacityDemandMetadata

Optional. The metadata associated with a capacity demand.

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

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

### getServiceDemands

Required. The capacity demand associated with a service.

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

### setServiceDemands

Required. The capacity demand associated with a service.

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

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

### getReporter

Output only. User who created the capacity plan.

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

### hasReporter

### clearReporter

### setReporter

Output only. User who created the capacity plan.

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

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

### getState

Output only. State of the plan.

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

### setState

Output only. State of the plan.

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

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

### getCreateTime

Output only. Timestamp when the plan was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the plan was created.

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

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

### getUpdateTime

Output only. Timestamp when the plan was last updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Timestamp when the plan was last updated.

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

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

### getDescription

Optional. Description of the plan.

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

### setDescription

Optional. Description of the plan.

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

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

### getTitle

Optional. Title of the plan.

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

### setTitle

Optional. Title of the plan.

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

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