Google Cloud OsConfig V1 Client - Class File (2.0.0-RC1)

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

A remote or local file.

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

Namespace

Google \ Cloud \ OsConfig \ V1 \ OSPolicy \ Resource

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ remote Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote

A generic remote file.

↳ gcs Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs

A Cloud Storage object.

↳ local_path string

A local path within the VM to use.

↳ allow_insecure bool

Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.

getRemote

A generic remote file.

Returns
Type Description
Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote|null

hasRemote

setRemote

A generic remote file.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote
Returns
Type Description
$this

getGcs

A Cloud Storage object.

Returns
Type Description
Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs|null

hasGcs

setGcs

A Cloud Storage object.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs
Returns
Type Description
$this

getLocalPath

A local path within the VM to use.

Returns
Type Description
string

hasLocalPath

setLocalPath

A local path within the VM to use.

Parameter
Name Description
var string
Returns
Type Description
$this

getAllowInsecure

Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified.

Cloud Storage: An object generation number must be specified.

Returns
Type Description
bool

setAllowInsecure

Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified.

Cloud Storage: An object generation number must be specified.

Parameter
Name Description
var bool
Returns
Type Description
$this

getType

Returns
Type Description
string