# Google Cloud Security Command Center V2 Client - Class GcpMetadata (2.5.1)

2.5.1 (latest) 2.5.0 2.4.2 2.3.0 2.2.1 2.1.1 2.0.4 1.32.0 1.31.0 1.30.0 1.29.0 1.28.2 1.21.0 1.20.2 1.19.1 1.18.0 1.17.0 1.16.0 1.15.1 1.14.2 1.13.1 Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class GcpMetadata.

Google Cloud metadata associated with the resource. Only applicable if the
finding's cloud provider is Google Cloud.

Generated from protobuf message `google.cloud.securitycenter.v2.GcpMetadata`

## Namespace

Google \\ Cloud \\ SecurityCenter \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ project` | `string` The full resource name of project that the resource belongs to. |
| `↳ project_display_name` | `string` The project ID that the resource belongs to. |
| `↳ parent` | `string` The full resource name of resource's parent. |
| `↳ parent_display_name` | `string` The human readable name of resource's parent. |
| `↳ folders` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.Folder>` Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization. |
| `↳ organization` | `string` The name of the organization that the resource belongs to. |

### getProject

The full resource name of project that the resource belongs to.

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

### setProject

The full resource name of project that the resource belongs to.

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

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

### getProjectDisplayName

The project ID that the resource belongs to.

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

### setProjectDisplayName

The project ID that the resource belongs to.

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

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

### getParent

The full resource name of resource's parent.

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

### setParent

The full resource name of resource's parent.

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

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

### getParentDisplayName

The human readable name of resource's parent.

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

### setParentDisplayName

The human readable name of resource's parent.

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

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

### getFolders

Output only. Contains a Folder message for each folder in the assets
ancestry. The first folder is the deepest nested folder, and the last
folder is the folder directly under the Organization.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.Folder>` |   |

### setFolders

Output only. Contains a Folder message for each folder in the assets
ancestry. The first folder is the deepest nested folder, and the last
folder is the folder directly under the Organization.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.Folder>` |

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

### getOrganization

The name of the organization that the resource belongs to.

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

### setOrganization

The name of the organization that the resource belongs to.

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

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