Google Cloud Security Command Center V1 Client - Class File (1.13.1)

Reference documentation and code samples for the Google Cloud Security Command Center V1 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.v1.File

Methods

__construct

Constructor.

Parameters
NameDescription
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. (Currently only populated for Malicious Script Executed findings.)

getPath

Absolute path of the file as a JSON encoded string.

Generated from protobuf field string path = 1;

Returns
TypeDescription
string

setPath

Absolute path of the file as a JSON encoded string.

Generated from protobuf field string path = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSize

Size of the file in bytes.

Generated from protobuf field int64 size = 2;

Returns
TypeDescription
int|string

setSize

Size of the file in bytes.

Generated from protobuf field int64 size = 2;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$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.

Generated from protobuf field string sha256 = 3;

Returns
TypeDescription
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.

Generated from protobuf field string sha256 = 3;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getHashedSize

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

Generated from protobuf field int64 hashed_size = 4;

Returns
TypeDescription
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.

Generated from protobuf field int64 hashed_size = 4;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getPartiallyHashed

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

Generated from protobuf field bool partially_hashed = 5;

Returns
TypeDescription
bool

setPartiallyHashed

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

Generated from protobuf field bool partially_hashed = 5;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getContents

Prefix of the file contents as a JSON encoded string.

(Currently only populated for Malicious Script Executed findings.)

Generated from protobuf field string contents = 6;

Returns
TypeDescription
string

setContents

Prefix of the file contents as a JSON encoded string.

(Currently only populated for Malicious Script Executed findings.)

Generated from protobuf field string contents = 6;

Parameter
NameDescription
var string
Returns
TypeDescription
$this