Google Cloud OsConfig V1 Client - Class PackageResource (2.0.2)

Reference documentation and code samples for the Google Cloud OsConfig V1 Client class PackageResource.

A resource that manages a system package.

Generated from protobuf message google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource

Namespace

Google \ Cloud \ OsConfig \ V1 \ OSPolicy \ Resource

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ desired_state int

Required. The desired state the agent should maintain for this package.

↳ apt PackageResource\APT

A package managed by Apt.

↳ deb PackageResource\Deb

A deb package file.

↳ yum PackageResource\YUM

A package managed by YUM.

↳ zypper PackageResource\Zypper

A package managed by Zypper.

↳ rpm PackageResource\RPM

An rpm package file.

↳ googet PackageResource\GooGet

A package managed by GooGet.

↳ msi PackageResource\MSI

An MSI package.

getDesiredState

Required. The desired state the agent should maintain for this package.

Returns
Type Description
int

setDesiredState

Required. The desired state the agent should maintain for this package.

Parameter
Name Description
var int
Returns
Type Description
$this

getApt

A package managed by Apt.

Returns
Type Description
PackageResource\APT|null

hasApt

setApt

A package managed by Apt.

Parameter
Name Description
var PackageResource\APT
Returns
Type Description
$this

getDeb

A deb package file.

Returns
Type Description
PackageResource\Deb|null

hasDeb

setDeb

A deb package file.

Parameter
Name Description
var PackageResource\Deb
Returns
Type Description
$this

getYum

A package managed by YUM.

Returns
Type Description
PackageResource\YUM|null

hasYum

setYum

A package managed by YUM.

Parameter
Name Description
var PackageResource\YUM
Returns
Type Description
$this

getZypper

A package managed by Zypper.

Returns
Type Description
PackageResource\Zypper|null

hasZypper

setZypper

A package managed by Zypper.

Parameter
Name Description
var PackageResource\Zypper
Returns
Type Description
$this

getRpm

An rpm package file.

Returns
Type Description
PackageResource\RPM|null

hasRpm

setRpm

An rpm package file.

Parameter
Name Description
var PackageResource\RPM
Returns
Type Description
$this

getGooget

A package managed by GooGet.

Returns
Type Description
PackageResource\GooGet|null

hasGooget

setGooget

A package managed by GooGet.

Parameter
Name Description
var PackageResource\GooGet
Returns
Type Description
$this

getMsi

An MSI package.

Returns
Type Description
PackageResource\MSI|null

hasMsi

setMsi

An MSI package.

Parameter
Name Description
var PackageResource\MSI
Returns
Type Description
$this

getSystemPackage

Returns
Type Description
string