# Grafeas V1 Client - Class UpgradeOccurrence (1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.2 1.2.2 1.1.3 1.0.0 0.10.3 0.9.0 0.8.3 0.7.1 0.6.0 0.5.0 0.4.4 Reference documentation and code samples for the Grafeas V1 Client class UpgradeOccurrence.

An Upgrade Occurrence represents that a specific resource_url could install a
specific upgrade. This presence is supplied via local sources (i.e. it is
present in the mirror and the running system has noticed its availability).

For Windows, both distribution and windows_update contain information for the
Windows update.

Generated from protobuf message `grafeas.v1.UpgradeOccurrence`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ package` | `string` Required for non-Windows OS. The package this Upgrade is for. |
| `↳ parsed_version` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.Version` Required for non-Windows OS. The version of the package in a machine + human readable form. |
| `↳ distribution` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.UpgradeDistribution` Metadata about the upgrade for available for the specific operating system for the resource_url. This allows efficient filtering, as well as making it easier to use the occurrence. |
| `↳ windows_update` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.WindowsUpdate` Required for Windows OS. Represents the metadata about the Windows update. |

### getPackage

Required for non-Windows OS. The package this Upgrade is for.

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

### setPackage

Required for non-Windows OS. The package this Upgrade is for.

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

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

### getParsedVersion

Required for non-Windows OS. The version of the package in a machine +
human readable form.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.Version|null` |   |

### hasParsedVersion

### clearParsedVersion

### setParsedVersion

Required for non-Windows OS. The version of the package in a machine +
human readable form.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.Version` |

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

### getDistribution

Metadata about the upgrade for available for the specific operating system
for the resource_url. This allows efficient filtering, as well as
making it easier to use the occurrence.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.UpgradeDistribution|null` |   |

### hasDistribution

### clearDistribution

### setDistribution

Metadata about the upgrade for available for the specific operating system
for the resource_url. This allows efficient filtering, as well as
making it easier to use the occurrence.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.UpgradeDistribution` |

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

### getWindowsUpdate

Required for Windows OS. Represents the metadata about the Windows update.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.WindowsUpdate|null` |   |

### hasWindowsUpdate

### clearWindowsUpdate

### setWindowsUpdate

Required for Windows OS. Represents the metadata about the Windows update.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.WindowsUpdate` |

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