# Google Cloud Asset V1 Client - Class AttachedResource (2.3.3)

2.3.3 (latest) 2.3.2 2.2.3 2.1.3 2.0.1 1.16.4 1.14.1 1.13.2 1.12.2 1.11.3 1.10.2 1.9.2 Reference documentation and code samples for the Google Cloud Asset V1 Client class AttachedResource.

Attached resource representation, which is defined by the corresponding
service provider. It represents an attached resource's payload.

Generated from protobuf message `google.cloud.asset.v1.AttachedResource`

## Namespace

Google \\ Cloud \\ Asset \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ asset_type` | `string` The type of this attached resource. Example: `osconfig.googleapis.com/Inventory` You can find the supported attached asset types of each resource in this table: `https://cloud.google.com/asset-inventory/docs/supported-asset-types` |
| `↳ versioned_resources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.VersionedResource>` Versioned resource representations of this attached resource. This is repeated because there could be multiple versions of the attached resource representations during version migration. |

### getAssetType

The type of this attached resource.

Example: `osconfig.googleapis.com/Inventory`
You can find the supported attached asset types of each resource in this
table:
`https://cloud.google.com/asset-inventory/docs/supported-asset-types`

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

### setAssetType

The type of this attached resource.

Example: `osconfig.googleapis.com/Inventory`
You can find the supported attached asset types of each resource in this
table:
`https://cloud.google.com/asset-inventory/docs/supported-asset-types`

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

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

### getVersionedResources

Versioned resource representations of this attached resource. This is
repeated because there could be multiple versions of the attached resource
representations during version migration.

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

### setVersionedResources

Versioned resource representations of this attached resource. This is
repeated because there could be multiple versions of the attached resource
representations during version migration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.VersionedResource>` |

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