Grafeas V1 Client - Class Occurrence (0.4.4)

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 message grafeas.v1.Occurrence

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The name of the occurrence in the form of projects/[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:123abc for a Docker image.

↳ note_name string

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.

↳ 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.

↳ create_time Google\Protobuf\Timestamp

Output only. The time this occurrence was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The time this occurrence was last updated.

↳ vulnerability Grafeas\V1\VulnerabilityOccurrence

Describes a security vulnerability.

↳ build Grafeas\V1\BuildOccurrence

Describes a verifiable build.

↳ image Grafeas\V1\ImageOccurrence

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

↳ package Grafeas\V1\PackageOccurrence

Describes the installation of a package on the linked resource.

↳ deployment Grafeas\V1\DeploymentOccurrence

Describes the deployment of an artifact on a runtime.

↳ discovery Grafeas\V1\DiscoveryOccurrence

Describes when a resource was discovered.

↳ attestation Grafeas\V1\AttestationOccurrence

Describes an attestation of an artifact.

↳ upgrade Grafeas\V1\UpgradeOccurrence

Describes an available package upgrade on the linked resource.

↳ compliance Grafeas\V1\ComplianceOccurrence

Describes a compliance violation on a linked resource.

↳ dsse_attestation Grafeas\V1\DSSEAttestationOccurrence

Describes an attestation of an artifact using dsse.

↳ envelope Grafeas\V1\Envelope

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

getName

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

Returns
TypeDescription
string

setName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

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.

Returns
TypeDescription
string

setResourceUri

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

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.

Returns
TypeDescription
string

setNoteName

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this

getRemediation

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

Returns
TypeDescription
string

setRemediation

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. The time this occurrence was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time this occurrence was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The time this occurrence was last updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time this occurrence was last updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getVulnerability

Describes a security vulnerability.

Returns
TypeDescription
Grafeas\V1\VulnerabilityOccurrence|null

hasVulnerability

setVulnerability

Describes a security vulnerability.

Parameter
NameDescription
var Grafeas\V1\VulnerabilityOccurrence
Returns
TypeDescription
$this

getBuild

Describes a verifiable build.

Returns
TypeDescription
Grafeas\V1\BuildOccurrence|null

hasBuild

setBuild

Describes a verifiable build.

Parameter
NameDescription
var Grafeas\V1\BuildOccurrence
Returns
TypeDescription
$this

getImage

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

Returns
TypeDescription
Grafeas\V1\ImageOccurrence|null

hasImage

setImage

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

Parameter
NameDescription
var Grafeas\V1\ImageOccurrence
Returns
TypeDescription
$this

getPackage

Describes the installation of a package on the linked resource.

Returns
TypeDescription
Grafeas\V1\PackageOccurrence|null

hasPackage

setPackage

Describes the installation of a package on the linked resource.

Parameter
NameDescription
var Grafeas\V1\PackageOccurrence
Returns
TypeDescription
$this

getDeployment

Describes the deployment of an artifact on a runtime.

Returns
TypeDescription
Grafeas\V1\DeploymentOccurrence|null

hasDeployment

setDeployment

Describes the deployment of an artifact on a runtime.

Parameter
NameDescription
var Grafeas\V1\DeploymentOccurrence
Returns
TypeDescription
$this

getDiscovery

Describes when a resource was discovered.

Returns
TypeDescription
Grafeas\V1\DiscoveryOccurrence|null

hasDiscovery

setDiscovery

Describes when a resource was discovered.

Parameter
NameDescription
var Grafeas\V1\DiscoveryOccurrence
Returns
TypeDescription
$this

getAttestation

Describes an attestation of an artifact.

Returns
TypeDescription
Grafeas\V1\AttestationOccurrence|null

hasAttestation

setAttestation

Describes an attestation of an artifact.

Parameter
NameDescription
var Grafeas\V1\AttestationOccurrence
Returns
TypeDescription
$this

getUpgrade

Describes an available package upgrade on the linked resource.

Returns
TypeDescription
Grafeas\V1\UpgradeOccurrence|null

hasUpgrade

setUpgrade

Describes an available package upgrade on the linked resource.

Parameter
NameDescription
var Grafeas\V1\UpgradeOccurrence
Returns
TypeDescription
$this

getCompliance

Describes a compliance violation on a linked resource.

Returns
TypeDescription
Grafeas\V1\ComplianceOccurrence|null

hasCompliance

setCompliance

Describes a compliance violation on a linked resource.

Parameter
NameDescription
var Grafeas\V1\ComplianceOccurrence
Returns
TypeDescription
$this

getDsseAttestation

Describes an attestation of an artifact using dsse.

Returns
TypeDescription
Grafeas\V1\DSSEAttestationOccurrence|null

hasDsseAttestation

setDsseAttestation

Describes an attestation of an artifact using dsse.

Parameter
NameDescription
var Grafeas\V1\DSSEAttestationOccurrence
Returns
TypeDescription
$this

getEnvelope

Returns
TypeDescription
Grafeas\V1\Envelope|null

hasEnvelope

clearEnvelope

setEnvelope

Parameter
NameDescription
var Grafeas\V1\Envelope
Returns
TypeDescription
$this

getDetails

Returns
TypeDescription
string