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

Provides information about the analysis status of a discovered resource.

Generated from protobuf message `grafeas.v1.DiscoveryOccurrence`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ continuous_analysis` | `int` Whether the resource is continuously analyzed. |
| `↳ analysis_status` | `int` The status of discovery for the resource. |
| `↳ analysis_completed` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryOccurrence.AnalysisCompleted` |
| `↳ analysis_error` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html>` Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors. |
| `↳ analysis_status_error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API. |
| `↳ cpe` | `string` The CPE of the resource being scanned. |
| `↳ last_scan_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The last time this resource was scanned. |
| `↳ archive_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time occurrences related to this discovery occurrence were archived. |
| `↳ sbom_status` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryOccurrence.SBOMStatus` The status of an SBOM generation. |
| `↳ vulnerability_attestation` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryOccurrence.VulnerabilityAttestation` The status of an vulnerability attestation generation. |
| `↳ files` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.DiscoveryOccurrence.File>` Files that make up the resource described by the occurrence. |
| `↳ last_vulnerability_update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The last time vulnerability scan results changed. |

### getContinuousAnalysis

Whether the resource is continuously analyzed.

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

### setContinuousAnalysis

Whether the resource is continuously analyzed.

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

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

### getAnalysisStatus

The status of discovery for the resource.

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

### setAnalysisStatus

The status of discovery for the resource.

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

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

### getAnalysisCompleted

Generated from protobuf field `.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7;`

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

### hasAnalysisCompleted

### clearAnalysisCompleted

### setAnalysisCompleted

Generated from protobuf field `.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7;`

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

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

### getAnalysisError

Indicates any errors encountered during analysis of a resource. There
could be 0 or more of these errors.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html>` |   |

### setAnalysisError

Indicates any errors encountered during analysis of a resource. There
could be 0 or more of these errors.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html>` |

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

### getAnalysisStatusError

When an error is encountered this will contain a LocalizedMessage under
details to show to the user. The LocalizedMessage is output only and
populated by the API.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasAnalysisStatusError

### clearAnalysisStatusError

### setAnalysisStatusError

When an error is encountered this will contain a LocalizedMessage under
details to show to the user. The LocalizedMessage is output only and
populated by the API.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getCpe

The CPE of the resource being scanned.

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

### setCpe

The CPE of the resource being scanned.

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

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

### getLastScanTime

The last time this resource was scanned.

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

### hasLastScanTime

### clearLastScanTime

### setLastScanTime

The last time this resource was scanned.

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

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

### getArchiveTime

The time occurrences related to this discovery occurrence were archived.

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

### hasArchiveTime

### clearArchiveTime

### setArchiveTime

The time occurrences related to this discovery occurrence were archived.

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

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

### getSbomStatus

The status of an SBOM generation.

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

### hasSbomStatus

### clearSbomStatus

### setSbomStatus

The status of an SBOM generation.

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

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

### getVulnerabilityAttestation

The status of an vulnerability attestation generation.

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

### hasVulnerabilityAttestation

### clearVulnerabilityAttestation

### setVulnerabilityAttestation

The status of an vulnerability attestation generation.

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

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

### getFiles

Files that make up the resource described by the occurrence.

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

### setFiles

Files that make up the resource described by the occurrence.

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

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

### getLastVulnerabilityUpdateTime

The last time vulnerability scan results changed.

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

### hasLastVulnerabilityUpdateTime

### clearLastVulnerabilityUpdateTime

### setLastVulnerabilityUpdateTime

The last time vulnerability scan results changed.

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

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