Class File.Builder (2.48.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.v2.File

Implements

FileOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public File.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
File.Builder
Overrides

build()

public File build()
Returns
TypeDescription
File

buildPartial()

public File buildPartial()
Returns
TypeDescription
File

clear()

public File.Builder clear()
Returns
TypeDescription
File.Builder
Overrides

clearContents()

public File.Builder clearContents()

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

string contents = 6;

Returns
TypeDescription
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.v2.File.DiskPath disk_path = 7;

Returns
TypeDescription
File.Builder

clearField(Descriptors.FieldDescriptor field)

public File.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
File.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public File.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
File.Builder
Overrides

clearPartiallyHashed()

public File.Builder clearPartiallyHashed()

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

bool partially_hashed = 5;

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

This builder for chaining.

clearSize()

public File.Builder clearSize()

Size of the file in bytes.

int64 size = 2;

Returns
TypeDescription
File.Builder

This builder for chaining.

clone()

public File.Builder clone()
Returns
TypeDescription
File.Builder
Overrides

getContents()

public String getContents()

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

string contents = 6;

Returns
TypeDescription
String

The contents.

getContentsBytes()

public ByteString getContentsBytes()

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

string contents = 6;

Returns
TypeDescription
ByteString

The bytes for contents.

getDefaultInstanceForType()

public File getDefaultInstanceForType()
Returns
TypeDescription
File

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDiskPath()

public File.DiskPath getDiskPath()

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

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

Returns
TypeDescription
File.DiskPath

The diskPath.

getDiskPathBuilder()

public File.DiskPath.Builder getDiskPathBuilder()

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

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

Returns
TypeDescription
File.DiskPath.Builder

getDiskPathOrBuilder()

public File.DiskPathOrBuilder getDiskPathOrBuilder()

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

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

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

The hashedSize.

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.

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
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, 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.

hasDiskPath()

public boolean hasDiskPath()

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

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

Returns
TypeDescription
boolean

Whether the diskPath field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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.v2.File.DiskPath disk_path = 7;

Parameter
NameDescription
valueFile.DiskPath
Returns
TypeDescription
File.Builder

mergeFrom(File other)

public File.Builder mergeFrom(File other)
Parameter
NameDescription
otherFile
Returns
TypeDescription
File.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public File.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
File.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public File.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
File.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final File.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The contents to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for contents to set.

Returns
TypeDescription
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.v2.File.DiskPath disk_path = 7;

Parameter
NameDescription
valueFile.DiskPath
Returns
TypeDescription
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.v2.File.DiskPath disk_path = 7;

Parameter
NameDescription
builderForValueFile.DiskPath.Builder
Returns
TypeDescription
File.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public File.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuelong

The hashedSize to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The partiallyHashed to set.

Returns
TypeDescription
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
NameDescription
valueString

The path to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for path to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The sha256 to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for sha256 to set.

Returns
TypeDescription
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
NameDescription
valuelong

The size to set.

Returns
TypeDescription
File.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final File.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
File.Builder
Overrides