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

The id for a Google Cloud Platform resource key.

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

## Namespace

Google \\ Cloud \\ CapacityPlanner \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ resource_code` | `string` Required. resource_code for the resource. eg: gce-ram, gce-vcpus, gce-gpu, gce-tpu, gce-vm, gce-persistent-disk, gce-local-ssd. |
| `↳ resource_id` | `https://docs.cloud.google.com/php/docs/reference/cloud-capacityplanner/latest/V1beta.ResourceIdentifier` Required. Id of the resource. |

### getResourceCode

Required. resource_code for the resource. eg: gce-ram, gce-vcpus,
gce-gpu, gce-tpu, gce-vm, gce-persistent-disk, gce-local-ssd.

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

### hasResourceCode

### setResourceCode

Required. resource_code for the resource. eg: gce-ram, gce-vcpus,
gce-gpu, gce-tpu, gce-vm, gce-persistent-disk, gce-local-ssd.

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

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

### getResourceId

Required. Id of the resource.

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

### hasResourceId

### clearResourceId

### setResourceId

Required. Id of the resource.

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

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

### getDemandFields

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