Grafeas V1 Client - Class PackageOccurrence (0.5.0)

Reference documentation and code samples for the Grafeas V1 Client class PackageOccurrence.

Details on how a particular software package was installed on a system.

Generated from protobuf message grafeas.v1.PackageOccurrence

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The name of the installed package.

↳ location array<Grafeas\V1\Location>

All of the places within the filesystem versions of this package have been found.

↳ package_type string

The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).

↳ cpe_uri string

The cpe_uri in CPE format denoting the package manager version distributing a package. The cpe_uri will be blank for language packages.

↳ architecture int

The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.

↳ license Grafeas\V1\License

Licenses that have been declared by the authors of the package.

↳ version Grafeas\V1\Version

The version of the package.

getName

The name of the installed package.

Returns
TypeDescription
string

setName

The name of the installed package.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLocation

All of the places within the filesystem versions of this package have been found.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLocation

All of the places within the filesystem versions of this package have been found.

Parameter
NameDescription
var array<Grafeas\V1\Location>
Returns
TypeDescription
$this

getPackageType

The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).

Returns
TypeDescription
string

setPackageType

The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCpeUri

The cpe_uri in CPE format denoting the package manager version distributing a package.

The cpe_uri will be blank for language packages.

Returns
TypeDescription
string

setCpeUri

The cpe_uri in CPE format denoting the package manager version distributing a package.

The cpe_uri will be blank for language packages.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getArchitecture

The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.

Returns
TypeDescription
int

setArchitecture

The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getLicense

Licenses that have been declared by the authors of the package.

Returns
TypeDescription
Grafeas\V1\License|null

hasLicense

clearLicense

setLicense

Licenses that have been declared by the authors of the package.

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

getVersion

The version of the package.

Returns
TypeDescription
Grafeas\V1\Version|null

hasVersion

clearVersion

setVersion

The version of the package.

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