# Google Cloud OsConfig V1 Client - Class VulnerabilityReport (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 VulnerabilityReport.

This API resource represents the vulnerability report for a specified
Compute Engine virtual machine (VM) instance at a given point in time.

For more information, see [Vulnerability
reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).

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

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The `vulnerabilityReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` |
| `↳ vulnerabilities` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.Vulnerability>` Output only. List of vulnerabilities affecting the VM. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp for when the last vulnerability report was generated for the VM. |
| `↳ highest_upgradable_cve_severity` | `int` Output only. Highest level of severity among all the upgradable vulnerabilities with CVEs attached. |

### getName

Output only. The `vulnerabilityReport` API resource name.

Format:
`projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`

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

### setName

Output only. The `vulnerabilityReport` API resource name.

Format:
`projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`

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

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

### getVulnerabilities

Output only. List of vulnerabilities affecting the VM.

| **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>` |   |

### setVulnerabilities

Output only. List of vulnerabilities affecting the VM.

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

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

### getUpdateTime

Output only. The timestamp for when the last vulnerability report was
generated for the VM.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The timestamp for when the last vulnerability report was
generated for the VM.

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

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

### getHighestUpgradableCveSeverity

Output only. Highest level of severity among all the upgradable
vulnerabilities with CVEs attached.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [VulnerabilitySeverityLevel](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.VulnerabilitySeverityLevel). |

### setHighestUpgradableCveSeverity

Output only. Highest level of severity among all the upgradable
vulnerabilities with CVEs attached.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [VulnerabilitySeverityLevel](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.VulnerabilityReport.VulnerabilitySeverityLevel). |

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