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

Capacity demand for a resource.

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` Output only. Identifier of resource demand. |
| `↳ resource_container` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.ResourceContainer` Required. The resource container associated with the demand. |
| `↳ resource_id` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.ResourceIdentifier` Required. Identifier of resource. |
| `↳ location_id` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.LocationIdentifier` Required. Identifier of location. |
| `↳ state` | `int` Output only. State of the resource demand. |
| `↳ reporter` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.User` Output only. User who reported the demand. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the demand was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the demand was last updated. |
| `↳ demand_values` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.DemandValues` Required. The demand values associated with the resource. |
| `↳ demand_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.DemandMetadata` Optional. The metadata associated with the demand. |
| `↳ child_resource_demands` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.ChildResourceDemand>` Optional. The child resource demands associated with the resource. |

### getId

Output only. Identifier of resource demand.

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

### setId

Output only. Identifier of resource demand.

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

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

### getResourceContainer

Required. The resource container associated with the demand.

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

### hasResourceContainer

### clearResourceContainer

### setResourceContainer

Required. The resource container associated with the demand.

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

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

### getResourceId

Required. Identifier of resource.

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

### hasResourceId

### clearResourceId

### setResourceId

Required. Identifier of resource.

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

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

### getLocationId

Required. Identifier of location.

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

### hasLocationId

### clearLocationId

### setLocationId

Required. Identifier of location.

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

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

### getState

Output only. State of the resource demand.

| **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 resource demand.

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

### getReporter

Output only. User who reported the demand.

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

### hasReporter

### clearReporter

### setReporter

Output only. User who reported the demand.

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

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

### getCreateTime

Output only. Timestamp when the demand was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the demand 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 demand 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 demand was last updated.

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

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

### getDemandValues

Required. The demand values associated with the resource.

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

### hasDemandValues

### clearDemandValues

### setDemandValues

Required. The demand values associated with the resource.

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

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

### getDemandMetadata

Optional. The metadata associated with the demand.

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

### hasDemandMetadata

### clearDemandMetadata

### setDemandMetadata

Optional. The metadata associated with the demand.

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

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

### getChildResourceDemands

Optional. The child resource demands associated with the resource.

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

### setChildResourceDemands

Optional. The child resource demands associated with the resource.

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

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