Class File.Builder (2.62.0)

public static final class File.Builder extends GeneratedMessageV3.Builder<File.Builder> 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 Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public File.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
File.Builder
Overrides

build()

public File build()
Returns
Type Description
File

buildPartial()

public File buildPartial()
Returns
Type Description
File

clear()

public File.Builder clear()
Returns
Type Description
File.Builder
Overrides

clearContents()

public File.Builder clearContents()

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

string contents = 6;

Returns
Type Description
File.Builder

This builder for chaining.

clearDiskPath()

public File.Builder clearDiskPath()

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Returns
Type Description
File.Builder

clearField(Descriptors.FieldDescriptor field)

public File.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
File.Builder
Overrides

clearHashedSize()

public File.Builder clearHashedSize()

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
Type Description
File.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public File.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
File.Builder
Overrides

clearPartiallyHashed()

public File.Builder clearPartiallyHashed()

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

bool partially_hashed = 5;

Returns
Type Description
File.Builder

This builder for chaining.

clearPath()

public File.Builder clearPath()

Absolute path of the file as a JSON encoded string.

string path = 1;

Returns
Type Description
File.Builder

This builder for chaining.

clearSha256()

public File.Builder clearSha256()

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.

string sha256 = 3;

Returns
Type Description
File.Builder

This builder for chaining.

clearSize()

public File.Builder clearSize()

Size of the file in bytes.

int64 size = 2;

Returns
Type Description
File.Builder

This builder for chaining.

clone()

public File.Builder clone()
Returns
Type Description
File.Builder
Overrides

getContents()

public String getContents()

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

string contents = 6;

Returns
Type Description
String

The contents.

getContentsBytes()

public ByteString getContentsBytes()

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

string contents = 6;

Returns
Type Description
ByteString

The bytes for contents.

getDefaultInstanceForType()

public File getDefaultInstanceForType()
Returns
Type Description
File

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDiskPath()

public File.DiskPath getDiskPath()

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Returns
Type Description
File.DiskPath

The diskPath.

getDiskPathBuilder()

public File.DiskPath.Builder getDiskPathBuilder()

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Returns
Type Description
File.DiskPath.Builder

getDiskPathOrBuilder()

public File.DiskPathOrBuilder getDiskPathOrBuilder()

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Returns
Type Description
File.DiskPathOrBuilder

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
Type Description
long

The hashedSize.

getPartiallyHashed()

public boolean getPartiallyHashed()

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

bool partially_hashed = 5;

Returns
Type Description
boolean

The partiallyHashed.

getPath()

public String getPath()

Absolute path of the file as a JSON encoded string.

string path = 1;

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

Absolute path of the file as a JSON encoded string.

string path = 1;

Returns
Type Description
ByteString

The bytes for path.

getSha256()

public String 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.

string sha256 = 3;

Returns
Type Description
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, sha256 represents the SHA256 hash of the entire file.

string sha256 = 3;

Returns
Type Description
ByteString

The bytes for sha256.

getSize()

public long getSize()

Size of the file in bytes.

int64 size = 2;

Returns
Type Description
long

The size.

hasDiskPath()

public boolean hasDiskPath()

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Returns
Type Description
boolean

Whether the diskPath field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDiskPath(File.DiskPath value)

public File.Builder mergeDiskPath(File.DiskPath value)

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Parameter
Name Description
value File.DiskPath
Returns
Type Description
File.Builder

mergeFrom(File other)

public File.Builder mergeFrom(File other)
Parameter
Name Description
other File
Returns
Type Description
File.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public File.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
File.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public File.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
File.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final File.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
File.Builder
Overrides

setContents(String value)

public File.Builder setContents(String value)

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

string contents = 6;

Parameter
Name Description
value String

The contents to set.

Returns
Type Description
File.Builder

This builder for chaining.

setContentsBytes(ByteString value)

public File.Builder setContentsBytes(ByteString value)

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

string contents = 6;

Parameter
Name Description
value ByteString

The bytes for contents to set.

Returns
Type Description
File.Builder

This builder for chaining.

setDiskPath(File.DiskPath value)

public File.Builder setDiskPath(File.DiskPath value)

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Parameter
Name Description
value File.DiskPath
Returns
Type Description
File.Builder

setDiskPath(File.DiskPath.Builder builderForValue)

public File.Builder setDiskPath(File.DiskPath.Builder builderForValue)

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

.google.cloud.securitycenter.v1.File.DiskPath disk_path = 7;

Parameter
Name Description
builderForValue File.DiskPath.Builder
Returns
Type Description
File.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public File.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
File.Builder
Overrides

setHashedSize(long value)

public File.Builder setHashedSize(long value)

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;

Parameter
Name Description
value long

The hashedSize to set.

Returns
Type Description
File.Builder

This builder for chaining.

setPartiallyHashed(boolean value)

public File.Builder setPartiallyHashed(boolean value)

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

bool partially_hashed = 5;

Parameter
Name Description
value boolean

The partiallyHashed to set.

Returns
Type Description
File.Builder

This builder for chaining.

setPath(String value)

public File.Builder setPath(String value)

Absolute path of the file as a JSON encoded string.

string path = 1;

Parameter
Name Description
value String

The path to set.

Returns
Type Description
File.Builder

This builder for chaining.

setPathBytes(ByteString value)

public File.Builder setPathBytes(ByteString value)

Absolute path of the file as a JSON encoded string.

string path = 1;

Parameter
Name Description
value ByteString

The bytes for path to set.

Returns
Type Description
File.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public File.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
File.Builder
Overrides

setSha256(String value)

public File.Builder setSha256(String value)

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.

string sha256 = 3;

Parameter
Name Description
value String

The sha256 to set.

Returns
Type Description
File.Builder

This builder for chaining.

setSha256Bytes(ByteString value)

public File.Builder setSha256Bytes(ByteString value)

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.

string sha256 = 3;

Parameter
Name Description
value ByteString

The bytes for sha256 to set.

Returns
Type Description
File.Builder

This builder for chaining.

setSize(long value)

public File.Builder setSize(long value)

Size of the file in bytes.

int64 size = 2;

Parameter
Name Description
value long

The size to set.

Returns
Type Description
File.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final File.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
File.Builder
Overrides