# Interface OccurrenceOrBuilder (2.94.0)

2.94.0 (latest) 2.92.0 2.89.0 2.88.0 2.86.0 2.84.0 2.83.0 2.82.0 2.81.0 2.79.0 2.77.0 2.76.0 2.75.0 2.74.0 2.73.0 2.71.0 2.69.0 2.68.0 2.65.0 2.64.0 2.63.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.53.0 2.52.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.5 2.3.1 2.2.3 2.1.3

    public interface OccurrenceOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAttestation()

    public abstract AttestationOccurrence getAttestation()

Describes an attestation of an artifact.

`.grafeas.v1.AttestationOccurrence attestation = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.AttestationOccurrence` | The attestation. |

### getAttestationOrBuilder()

    public abstract AttestationOccurrenceOrBuilder getAttestationOrBuilder()

Describes an attestation of an artifact.

`.grafeas.v1.AttestationOccurrence attestation = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.AttestationOccurrenceOrBuilder` |   |

### getBuild()

    public abstract BuildOccurrence getBuild()

Describes a verifiable build.

`.grafeas.v1.BuildOccurrence build = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.BuildOccurrence` | The build. |

### getBuildOrBuilder()

    public abstract BuildOccurrenceOrBuilder getBuildOrBuilder()

Describes a verifiable build.

`.grafeas.v1.BuildOccurrence build = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.BuildOccurrenceOrBuilder` |   |

### getCompliance()

    public abstract ComplianceOccurrence getCompliance()

Describes a compliance violation on a linked resource.

`.grafeas.v1.ComplianceOccurrence compliance = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.ComplianceOccurrence` | The compliance. |

### getComplianceOrBuilder()

    public abstract ComplianceOccurrenceOrBuilder getComplianceOrBuilder()

Describes a compliance violation on a linked resource.

`.grafeas.v1.ComplianceOccurrence compliance = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.ComplianceOccurrenceOrBuilder` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. The time this occurrence was created.

`.google.protobuf.Timestamp create_time = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time this occurrence was created.

`.google.protobuf.Timestamp create_time = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDeployment()

    public abstract DeploymentOccurrence getDeployment()

Describes the deployment of an artifact on a runtime.

`.grafeas.v1.DeploymentOccurrence deployment = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.DeploymentOccurrence` | The deployment. |

### getDeploymentOrBuilder()

    public abstract DeploymentOccurrenceOrBuilder getDeploymentOrBuilder()

Describes the deployment of an artifact on a runtime.

`.grafeas.v1.DeploymentOccurrence deployment = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.DeploymentOccurrenceOrBuilder` |   |

### getDetailsCase()

    public abstract Occurrence.DetailsCase getDetailsCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.Occurrence.DetailsCase` |   |

### getDiscovery()

    public abstract DiscoveryOccurrence getDiscovery()

Describes when a resource was discovered.

`.grafeas.v1.DiscoveryOccurrence discovery = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.DiscoveryOccurrence` | The discovery. |

### getDiscoveryOrBuilder()

    public abstract DiscoveryOccurrenceOrBuilder getDiscoveryOrBuilder()

Describes when a resource was discovered.

`.grafeas.v1.DiscoveryOccurrence discovery = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.DiscoveryOccurrenceOrBuilder` |   |

### getDsseAttestation()

    public abstract DSSEAttestationOccurrence getDsseAttestation()

Describes an attestation of an artifact using dsse.

`.grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.DSSEAttestationOccurrence` | The dsseAttestation. |

### getDsseAttestationOrBuilder()

    public abstract DSSEAttestationOccurrenceOrBuilder getDsseAttestationOrBuilder()

Describes an attestation of an artifact using dsse.

`.grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder` |   |

### getEnvelope()

    public abstract Envelope getEnvelope()

<https://github.com/secure-systems-lab/dsse>

`.grafeas.v1.Envelope envelope = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.Envelope` | The envelope. |

### getEnvelopeOrBuilder()

    public abstract EnvelopeOrBuilder getEnvelopeOrBuilder()

<https://github.com/secure-systems-lab/dsse>

`.grafeas.v1.Envelope envelope = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.EnvelopeOrBuilder` |   |

### getImage()

    public abstract ImageOccurrence getImage()

Describes how this resource derives from the basis in the associated
note.

`.grafeas.v1.ImageOccurrence image = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.ImageOccurrence` | The image. |

### getImageOrBuilder()

    public abstract ImageOccurrenceOrBuilder getImageOrBuilder()

Describes how this resource derives from the basis in the associated
note.

`.grafeas.v1.ImageOccurrence image = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.ImageOccurrenceOrBuilder` |   |

### getKind()

    public abstract NoteKind getKind()

Output only. This explicitly denotes which of the occurrence details are
specified. This field can be used as a filter in list requests.

`.grafeas.v1.NoteKind kind = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.NoteKind` | The kind. |

### getKindValue()

    public abstract int getKindValue()

Output only. This explicitly denotes which of the occurrence details are
specified. This field can be used as a filter in list requests.

`.grafeas.v1.NoteKind kind = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for kind. |

### getName()

    public abstract String getName()

Output only. The name of the occurrence in the form of
`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. The name of the occurrence in the form of
`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getNoteName()

    public abstract String getNoteName()

Required. Immutable. The analysis note associated with this occurrence, in
the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
used as a filter in list requests.

`string note_name = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The noteName. |

### getNoteNameBytes()

    public abstract ByteString getNoteNameBytes()

Required. Immutable. The analysis note associated with this occurrence, in
the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
used as a filter in list requests.

`string note_name = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for noteName. |

### getPackage()

    public abstract PackageOccurrence getPackage()

Describes the installation of a package on the linked resource.

`.grafeas.v1.PackageOccurrence package = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.PackageOccurrence` | The package. |

### getPackageOrBuilder()

    public abstract PackageOccurrenceOrBuilder getPackageOrBuilder()

Describes the installation of a package on the linked resource.

`.grafeas.v1.PackageOccurrence package = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.PackageOccurrenceOrBuilder` |   |

### getRemediation()

    public abstract String getRemediation()

A description of actions that can be taken to remedy the note.

`string remediation = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The remediation. |

### getRemediationBytes()

    public abstract ByteString getRemediationBytes()

A description of actions that can be taken to remedy the note.

`string remediation = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for remediation. |

### getResourceUri()

    public abstract String getResourceUri()

Required. Immutable. A URI that represents the resource for which the
occurrence applies. For example,
`https://gcr.io/project/image@sha256:123abc` for a Docker image.

`string resource_uri = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The resourceUri. |

### getResourceUriBytes()

    public abstract ByteString getResourceUriBytes()

Required. Immutable. A URI that represents the resource for which the
occurrence applies. For example,
`https://gcr.io/project/image@sha256:123abc` for a Docker image.

`string resource_uri = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for resourceUri. |

### getSbomReference()

    public abstract SBOMReferenceOccurrence getSbomReference()

Describes a specific SBOM reference occurrences.

`.grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.SBOMReferenceOccurrence` | The sbomReference. |

### getSbomReferenceOrBuilder()

    public abstract SBOMReferenceOccurrenceOrBuilder getSbomReferenceOrBuilder()

Describes a specific SBOM reference occurrences.

`.grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.SBOMReferenceOccurrenceOrBuilder` |   |

### getSecret()

    public abstract SecretOccurrence getSecret()

Describes a secret.

`.grafeas.v1.SecretOccurrence secret = 20;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.SecretOccurrence` | The secret. |

### getSecretOrBuilder()

    public abstract SecretOccurrenceOrBuilder getSecretOrBuilder()

Describes a secret.

`.grafeas.v1.SecretOccurrence secret = 20;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.SecretOccurrenceOrBuilder` |   |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. The time this occurrence was last updated.

`.google.protobuf.Timestamp update_time = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time this occurrence was last updated.

`.google.protobuf.Timestamp update_time = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getUpgrade()

    public abstract UpgradeOccurrence getUpgrade()

Describes an available package upgrade on the linked resource.

`.grafeas.v1.UpgradeOccurrence upgrade = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.UpgradeOccurrence` | The upgrade. |

### getUpgradeOrBuilder()

    public abstract UpgradeOccurrenceOrBuilder getUpgradeOrBuilder()

Describes an available package upgrade on the linked resource.

`.grafeas.v1.UpgradeOccurrence upgrade = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.UpgradeOccurrenceOrBuilder` |   |

### getVulnerability()

    public abstract VulnerabilityOccurrence getVulnerability()

Describes a security vulnerability.

`.grafeas.v1.VulnerabilityOccurrence vulnerability = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.VulnerabilityOccurrence` | The vulnerability. |

### getVulnerabilityOrBuilder()

    public abstract VulnerabilityOccurrenceOrBuilder getVulnerabilityOrBuilder()

Describes a security vulnerability.

`.grafeas.v1.VulnerabilityOccurrence vulnerability = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grafeas/latest/io.grafeas.v1.VulnerabilityOccurrenceOrBuilder` |   |

### hasAttestation()

    public abstract boolean hasAttestation()

Describes an attestation of an artifact.

`.grafeas.v1.AttestationOccurrence attestation = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the attestation field is set. |

### hasBuild()

    public abstract boolean hasBuild()

Describes a verifiable build.

`.grafeas.v1.BuildOccurrence build = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the build field is set. |

### hasCompliance()

    public abstract boolean hasCompliance()

Describes a compliance violation on a linked resource.

`.grafeas.v1.ComplianceOccurrence compliance = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the compliance field is set. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. The time this occurrence was created.

`.google.protobuf.Timestamp create_time = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasDeployment()

    public abstract boolean hasDeployment()

Describes the deployment of an artifact on a runtime.

`.grafeas.v1.DeploymentOccurrence deployment = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the deployment field is set. |

### hasDiscovery()

    public abstract boolean hasDiscovery()

Describes when a resource was discovered.

`.grafeas.v1.DiscoveryOccurrence discovery = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the discovery field is set. |

### hasDsseAttestation()

    public abstract boolean hasDsseAttestation()

Describes an attestation of an artifact using dsse.

`.grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the dsseAttestation field is set. |

### hasEnvelope()

    public abstract boolean hasEnvelope()

<https://github.com/secure-systems-lab/dsse>

`.grafeas.v1.Envelope envelope = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the envelope field is set. |

### hasImage()

    public abstract boolean hasImage()

Describes how this resource derives from the basis in the associated
note.

`.grafeas.v1.ImageOccurrence image = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the image field is set. |

### hasPackage()

    public abstract boolean hasPackage()

Describes the installation of a package on the linked resource.

`.grafeas.v1.PackageOccurrence package = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the package field is set. |

### hasSbomReference()

    public abstract boolean hasSbomReference()

Describes a specific SBOM reference occurrences.

`.grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the sbomReference field is set. |

### hasSecret()

    public abstract boolean hasSecret()

Describes a secret.

`.grafeas.v1.SecretOccurrence secret = 20;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the secret field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. The time this occurrence was last updated.

`.google.protobuf.Timestamp update_time = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |

### hasUpgrade()

    public abstract boolean hasUpgrade()

Describes an available package upgrade on the linked resource.

`.grafeas.v1.UpgradeOccurrence upgrade = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the upgrade field is set. |

### hasVulnerability()

    public abstract boolean hasVulnerability()

Describes a security vulnerability.

`.grafeas.v1.VulnerabilityOccurrence vulnerability = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the vulnerability field is set. |