# Grafeas V1 Client - Class ImageOccurrence (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 ImageOccurrence.

Details of the derived image portion of the DockerImage relationship. This
image would be produced from a Dockerfile with FROM \<DockerImage.Basis in
attached Note\>.

Generated from protobuf message `grafeas.v1.ImageOccurrence`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ fingerprint` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.Fingerprint` Required. The fingerprint of the derived image. |
| `↳ distance` | `int` Output only. The number of layers by which this image differs from the associated image basis. |
| `↳ layer_info` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.Layer>` This contains layer-specific metadata, if populated it has length "distance" and is ordered with \[distance\] being the layer immediately following the base image and \[1\] being the final layer. |
| `↳ base_resource_url` | `string` Output only. This contains the base image URL for the derived image occurrence. |

### getFingerprint

Required. The fingerprint of the derived image.

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

### hasFingerprint

### clearFingerprint

### setFingerprint

Required. The fingerprint of the derived image.

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

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

### getDistance

Output only. The number of layers by which this image differs from the
associated image basis.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setDistance

Output only. The number of layers by which this image differs from the
associated image basis.

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

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

### getLayerInfo

This contains layer-specific metadata, if populated it has length
"distance" and is ordered with \[distance\] being the layer immediately
following the base image and \[1\] being the final layer.

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

### setLayerInfo

This contains layer-specific metadata, if populated it has length
"distance" and is ordered with \[distance\] being the layer immediately
following the base image and \[1\] being the final layer.

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

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

### getBaseResourceUrl

Output only. This contains the base image URL for the derived image
occurrence.

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

### setBaseResourceUrl

Output only. This contains the base image URL for the derived image
occurrence.

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

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