Reference documentation and code samples for the Grafeas V1 Client class Occurrence.
An instance of an analysis type that has been found on a resource.
Generated from protobuf messagegrafeas.v1.Occurrence
Namespace
Grafeas \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The name of the occurrence in the form ofprojects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
↳ resource_uri
string
Required. Immutable. A URI that represents the resource for which the occurrence applies. For example,https://gcr.io/project/image@sha256:123abcfor a Docker image.
↳ note_name
string
Required. Immutable. The analysis note associated with this occurrence, in the form ofprojects/[PROVIDER_ID]/notes/[NOTE_ID]. This field can be used as a filter in list requests.
↳ kind
int
Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.
↳ remediation
string
A description of actions that can be taken to remedy the note.
Output only. The name of the occurrence in the form ofprojects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Returns
Type
Description
string
setName
Output only. The name of the occurrence in the form ofprojects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getResourceUri
Required. Immutable. A URI that represents the resource for which the
occurrence applies. For example,https://gcr.io/project/image@sha256:123abcfor a Docker image.
Returns
Type
Description
string
setResourceUri
Required. Immutable. A URI that represents the resource for which the
occurrence applies. For example,https://gcr.io/project/image@sha256:123abcfor a Docker image.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNoteName
Required. Immutable. The analysis note associated with this occurrence, in
the form ofprojects/[PROVIDER_ID]/notes/[NOTE_ID]. This field can be
used as a filter in list requests.
Returns
Type
Description
string
setNoteName
Required. Immutable. The analysis note associated with this occurrence, in
the form ofprojects/[PROVIDER_ID]/notes/[NOTE_ID]. This field can be
used as a filter in list requests.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKind
Output only. This explicitly denotes which of the occurrence details are
specified. This field can be used as a filter in list requests.
Returns
Type
Description
int
setKind
Output only. This explicitly denotes which of the occurrence details are
specified. This field can be used as a filter in list requests.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getRemediation
A description of actions that can be taken to remedy the note.
Returns
Type
Description
string
setRemediation
A description of actions that can be taken to remedy the note.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCreateTime
Output only. The time this occurrence was created.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Grafeas V1 Client - Class Occurrence (1.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.2 (latest)](/php/docs/reference/grafeas/latest/V1.Occurrence)\n- [1.2.1](/php/docs/reference/grafeas/1.2.1/V1.Occurrence)\n- [1.1.3](/php/docs/reference/grafeas/1.1.3/V1.Occurrence)\n- [1.0.0](/php/docs/reference/grafeas/1.0.0/V1.Occurrence)\n- [0.10.3](/php/docs/reference/grafeas/0.10.3/V1.Occurrence)\n- [0.9.0](/php/docs/reference/grafeas/0.9.0/V1.Occurrence)\n- [0.8.3](/php/docs/reference/grafeas/0.8.3/V1.Occurrence)\n- [0.7.1](/php/docs/reference/grafeas/0.7.1/V1.Occurrence)\n- [0.6.0](/php/docs/reference/grafeas/0.6.0/V1.Occurrence)\n- [0.5.0](/php/docs/reference/grafeas/0.5.0/V1.Occurrence)\n- [0.4.4](/php/docs/reference/grafeas/0.4.4/V1.Occurrence) \nReference documentation and code samples for the Grafeas V1 Client class Occurrence.\n\nAn instance of an analysis type that has been found on a resource.\n\nGenerated from protobuf message `grafeas.v1.Occurrence`\n\nNamespace\n---------\n\nGrafeas \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.\n\n### setName\n\nOutput only. The name of the occurrence in the form of\n`projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.\n\n### getResourceUri\n\nRequired. Immutable. A URI that represents the resource for which the\noccurrence applies. For example,\n`https://gcr.io/project/image@sha256:123abc` for a Docker image.\n\n### setResourceUri\n\nRequired. Immutable. A URI that represents the resource for which the\noccurrence applies. For example,\n`https://gcr.io/project/image@sha256:123abc` for a Docker image.\n\n### getNoteName\n\nRequired. Immutable. The analysis note associated with this occurrence, in\nthe form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be\nused as a filter in list requests.\n\n### setNoteName\n\nRequired. Immutable. The analysis note associated with this occurrence, in\nthe form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be\nused as a filter in list requests.\n\n### getKind\n\nOutput only. This explicitly denotes which of the occurrence details are\nspecified. This field can be used as a filter in list requests.\n\n### setKind\n\nOutput only. This explicitly denotes which of the occurrence details are\nspecified. This field can be used as a filter in list requests.\n\n### getRemediation\n\nA description of actions that can be taken to remedy the note.\n\n### setRemediation\n\nA description of actions that can be taken to remedy the note.\n\n### getCreateTime\n\nOutput only. The time this occurrence was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The time this occurrence was created.\n\n### getUpdateTime\n\nOutput only. The time this occurrence was last updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The time this occurrence was last updated.\n\n### getVulnerability\n\nDescribes a security vulnerability.\n\n### hasVulnerability\n\n### setVulnerability\n\nDescribes a security vulnerability.\n\n### getBuild\n\nDescribes a verifiable build.\n\n### hasBuild\n\n### setBuild\n\nDescribes a verifiable build.\n\n### getImage\n\nDescribes how this resource derives from the basis in the associated\nnote.\n\n### hasImage\n\n### setImage\n\nDescribes how this resource derives from the basis in the associated\nnote.\n\n### getPackage\n\nDescribes the installation of a package on the linked resource.\n\n### hasPackage\n\n### setPackage\n\nDescribes the installation of a package on the linked resource.\n\n### getDeployment\n\nDescribes the deployment of an artifact on a runtime.\n\n### hasDeployment\n\n### setDeployment\n\nDescribes the deployment of an artifact on a runtime.\n\n### getDiscovery\n\nDescribes when a resource was discovered.\n\n### hasDiscovery\n\n### setDiscovery\n\nDescribes when a resource was discovered.\n\n### getAttestation\n\nDescribes an attestation of an artifact.\n\n### hasAttestation\n\n### setAttestation\n\nDescribes an attestation of an artifact.\n\n### getUpgrade\n\nDescribes an available package upgrade on the linked resource.\n\n### hasUpgrade\n\n### setUpgrade\n\nDescribes an available package upgrade on the linked resource.\n\n### getCompliance\n\nDescribes a compliance violation on a linked resource.\n\n### hasCompliance\n\n### setCompliance\n\nDescribes a compliance violation on a linked resource.\n\n### getDsseAttestation\n\nDescribes an attestation of an artifact using dsse.\n\n### hasDsseAttestation\n\n### setDsseAttestation\n\nDescribes an attestation of an artifact using dsse.\n\n### getSbomReference\n\nDescribes a specific SBOM reference occurrences.\n\n### hasSbomReference\n\n### setSbomReference\n\nDescribes a specific SBOM reference occurrences.\n\n### getSecret\n\nDescribes a secret.\n\n### hasSecret\n\n### setSecret\n\nDescribes a secret.\n\n### getEnvelope\n\n\u003chttps://github.com/secure-systems-lab/dsse\u003e\n\n### hasEnvelope\n\n### clearEnvelope\n\n### setEnvelope\n\n\u003chttps://github.com/secure-systems-lab/dsse\u003e\n\n### getDetails"]]