Google Cloud OsConfig V1 Client - Class PackageResource (1.2.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
NameDescription
data array

Optional. Data for populating the Message object.

↳ desired_state int

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

↳ apt Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT

A package managed by Apt.

↳ deb Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb

A deb package file.

↳ yum Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM

A package managed by YUM.

↳ zypper Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper

A package managed by Zypper.

↳ rpm Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM

An rpm package file.

↳ googet Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet

A package managed by GooGet.

↳ msi Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI

An MSI package.

getDesiredState

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

Returns
TypeDescription
int

setDesiredState

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getApt

A package managed by Apt.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT|null

hasApt

setApt

A package managed by Apt.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT
Returns
TypeDescription
$this

getDeb

A deb package file.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb|null

hasDeb

setDeb

A deb package file.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb
Returns
TypeDescription
$this

getYum

A package managed by YUM.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM|null

hasYum

setYum

A package managed by YUM.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM
Returns
TypeDescription
$this

getZypper

A package managed by Zypper.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper|null

hasZypper

setZypper

A package managed by Zypper.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper
Returns
TypeDescription
$this

getRpm

An rpm package file.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM|null

hasRpm

setRpm

An rpm package file.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM
Returns
TypeDescription
$this

getGooget

A package managed by GooGet.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet|null

hasGooget

setGooget

A package managed by GooGet.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet
Returns
TypeDescription
$this

getMsi

An MSI package.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI|null

hasMsi

setMsi

An MSI package.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI
Returns
TypeDescription
$this

getSystemPackage

Returns
TypeDescription
string