# Google Cloud OsConfig V1 Client - Class Vulnerability (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class Vulnerability.

A vulnerability affecting the VM instance.

Generated from protobuf message `google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1 \\ VulnerabilityReport

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ details` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.Vulnerability.Details` Contains metadata as per the upstream feed of the operating system and NVD. |
| `↳ installed_inventory_item_ids` | `string[]` Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field displays the inventory items affected by this vulnerability. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. For some distros, this field may be empty. |
| `↳ available_inventory_item_ids` | `string[]` Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. If there is no available fix, the field is empty. The `inventory_item` value specifies the latest `SoftwarePackage` available to the VM that fixes the vulnerability. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The timestamp for when the vulnerability was first detected. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The timestamp for when the vulnerability was last modified. |
| `↳ items` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.Vulnerability.Item>` List of items affected by the vulnerability. |

### getDetails

Contains metadata as per the upstream feed of the operating system and
NVD.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.Vulnerability.Details|null` |   |

### hasDetails

### clearDetails

### setDetails

Contains metadata as per the upstream feed of the operating system and
NVD.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.Vulnerability.Details` |

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

### getInstalledInventoryItemIds

Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.

This field displays the inventory items affected by this vulnerability.
If the vulnerability report was not updated after the VM inventory
update, these values might not display in VM inventory. For some distros,
this field may be empty.

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

### setInstalledInventoryItemIds

Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.

This field displays the inventory items affected by this vulnerability.
If the vulnerability report was not updated after the VM inventory
update, these values might not display in VM inventory. For some distros,
this field may be empty.

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

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

### getAvailableInventoryItemIds

Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.

If the vulnerability report was not updated after the VM inventory
update, these values might not display in VM inventory. If there is no
available fix, the field is empty. The `inventory_item` value specifies
the latest `SoftwarePackage` available to the VM that fixes the
vulnerability.

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

### setAvailableInventoryItemIds

Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.

If the vulnerability report was not updated after the VM inventory
update, these values might not display in VM inventory. If there is no
available fix, the field is empty. The `inventory_item` value specifies
the latest `SoftwarePackage` available to the VM that fixes the
vulnerability.

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

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

### getCreateTime

The timestamp for when the vulnerability was first detected.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

The timestamp for when the vulnerability was first detected.

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

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

### getUpdateTime

The timestamp for when the vulnerability was last modified.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

The timestamp for when the vulnerability was last modified.

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

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

### getItems

List of items affected by the vulnerability.

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

### setItems

List of items affected by the vulnerability.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.Vulnerability.Item>` |

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