Google Cloud OsConfig V1 Client - Class PackageResource (2.0.0)

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 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
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
Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT|null

hasApt

setApt

A package managed by Apt.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT
Returns
Type Description
$this

getDeb

A deb package file.

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

hasDeb

setDeb

A deb package file.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb
Returns
Type Description
$this

getYum

A package managed by YUM.

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

hasYum

setYum

A package managed by YUM.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM
Returns
Type Description
$this

getZypper

A package managed by Zypper.

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

hasZypper

setZypper

A package managed by Zypper.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper
Returns
Type Description
$this

getRpm

An rpm package file.

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

hasRpm

setRpm

An rpm package file.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM
Returns
Type Description
$this

getGooget

A package managed by GooGet.

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

hasGooget

setGooget

A package managed by GooGet.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet
Returns
Type Description
$this

getMsi

An MSI package.

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

hasMsi

setMsi

An MSI package.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI
Returns
Type Description
$this

getSystemPackage

Returns
Type Description
string