Google Cloud Security Command Center V2 Client - Class File (1.29.0)

Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class File.

File information about the related binary/library used by an executable, or the script used by a script interpreter

Generated from protobuf message google.cloud.securitycenter.v2.File

Namespace

Google \ Cloud \ SecurityCenter \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ path string

Absolute path of the file as a JSON encoded string.

↳ size int|string

Size of the file in bytes.

↳ sha256 string

SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.

↳ hashed_size int|string

The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.

↳ partially_hashed bool

True when the hash covers only a prefix of the file.

↳ contents string

Prefix of the file contents as a JSON-encoded string.

↳ disk_path Google\Cloud\SecurityCenter\V2\File\DiskPath

Path of the file in terms of underlying disk/partition identifiers.

getPath

Absolute path of the file as a JSON encoded string.

Returns
Type Description
string

setPath

Absolute path of the file as a JSON encoded string.

Parameter
Name Description
var string
Returns
Type Description
$this

getSize

Size of the file in bytes.

Returns
Type Description
int|string

setSize

Size of the file in bytes.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getSha256

SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.

Returns
Type Description
string

setSha256

SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.

Parameter
Name Description
var string
Returns
Type Description
$this

getHashedSize

The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.

Returns
Type Description
int|string

setHashedSize

The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getPartiallyHashed

True when the hash covers only a prefix of the file.

Returns
Type Description
bool

setPartiallyHashed

True when the hash covers only a prefix of the file.

Parameter
Name Description
var bool
Returns
Type Description
$this

getContents

Prefix of the file contents as a JSON-encoded string.

Returns
Type Description
string

setContents

Prefix of the file contents as a JSON-encoded string.

Parameter
Name Description
var string
Returns
Type Description
$this

getDiskPath

Path of the file in terms of underlying disk/partition identifiers.

Returns
Type Description
Google\Cloud\SecurityCenter\V2\File\DiskPath|null

hasDiskPath

clearDiskPath

setDiskPath

Path of the file in terms of underlying disk/partition identifiers.

Parameter
Name Description
var Google\Cloud\SecurityCenter\V2\File\DiskPath
Returns
Type Description
$this