Class File (2.7.0)

public final class File extends GeneratedMessageV3 implements FileOrBuilder

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

Protobuf type google.cloud.securitycenter.v1.File

Implements

FileOrBuilder

Static Fields

CONTENTS_FIELD_NUMBER

public static final int CONTENTS_FIELD_NUMBER
Field Value
TypeDescription
int

HASHED_SIZE_FIELD_NUMBER

public static final int HASHED_SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

PARTIALLY_HASHED_FIELD_NUMBER

public static final int PARTIALLY_HASHED_FIELD_NUMBER
Field Value
TypeDescription
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
TypeDescription
int

SHA256_FIELD_NUMBER

public static final int SHA256_FIELD_NUMBER
Field Value
TypeDescription
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static File getDefaultInstance()
Returns
TypeDescription
File

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static File.Builder newBuilder()
Returns
TypeDescription
File.Builder

newBuilder(File prototype)

public static File.Builder newBuilder(File prototype)
Parameter
NameDescription
prototypeFile
Returns
TypeDescription
File.Builder

parseDelimitedFrom(InputStream input)

public static File parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
File
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static File parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static File parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
File
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static File parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static File parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
File
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static File parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static File parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
File
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static File parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static File parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
File
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static File parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static File parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
File
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static File parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<File> parser()
Returns
TypeDescription
Parser<File>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getContents()

public String getContents()

Prefix of the file contents as a JSON encoded string. (Currently only populated for Malicious Script Executed findings.)

string contents = 6;

Returns
TypeDescription
String

The contents.

getContentsBytes()

public ByteString getContentsBytes()

Prefix of the file contents as a JSON encoded string. (Currently only populated for Malicious Script Executed findings.)

string contents = 6;

Returns
TypeDescription
ByteString

The bytes for contents.

getDefaultInstanceForType()

public File getDefaultInstanceForType()
Returns
TypeDescription
File

getHashedSize()

public long getHashedSize()

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

int64 hashed_size = 4;

Returns
TypeDescription
long

The hashedSize.

getParserForType()

public Parser<File> getParserForType()
Returns
TypeDescription
Parser<File>
Overrides

getPartiallyHashed()

public boolean getPartiallyHashed()

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

bool partially_hashed = 5;

Returns
TypeDescription
boolean

The partiallyHashed.

getPath()

public String getPath()

Absolute path of the file as a JSON encoded string.

string path = 1;

Returns
TypeDescription
String

The path.

getPathBytes()

public ByteString getPathBytes()

Absolute path of the file as a JSON encoded string.

string path = 1;

Returns
TypeDescription
ByteString

The bytes for path.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSha256()

public String getSha256()

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

string sha256 = 3;

Returns
TypeDescription
String

The sha256.

getSha256Bytes()

public ByteString getSha256Bytes()

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

string sha256 = 3;

Returns
TypeDescription
ByteString

The bytes for sha256.

getSize()

public long getSize()

Size of the file in bytes.

int64 size = 2;

Returns
TypeDescription
long

The size.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public File.Builder newBuilderForType()
Returns
TypeDescription
File.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected File.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
File.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public File.Builder toBuilder()
Returns
TypeDescription
File.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException