# Google Cloud Assured Workloads V1beta1 Client - Class ResourceInfo (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.11.5 0.10.2 0.9.1 0.8.3 0.7.3

> [!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 Assured Workloads V1beta1 Client class ResourceInfo.

Represent the resources that are children of this Workload.

Generated from protobuf message `google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo`

## Namespace

Google \\ Cloud \\ AssuredWorkloads \\ V1beta1 \\ Workload

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ resource_id` | `int|string` Resource identifier. For a project this represents project_number. |
| `↳ resource_type` | `int` Indicates the type of resource. |

### getResourceId

Resource identifier.

For a project this represents project_number.

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

### setResourceId

Resource identifier.

For a project this represents project_number.

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

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

### getResourceType

Indicates the type of resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ResourceType](https://docs.cloud.google.com/php/docs/reference/cloud-assured-workloads/latest/V1beta1.Workload.ResourceInfo.ResourceType). |

### setResourceType

Indicates the type of resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ResourceType](https://docs.cloud.google.com/php/docs/reference/cloud-assured-workloads/latest/V1beta1.Workload.ResourceInfo.ResourceType). |

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