Class RawHashes.Builder (2.42.0)

public static final class RawHashes.Builder extends GeneratedMessageV3.Builder<RawHashes.Builder> implements RawHashesOrBuilder

The uncompressed threat entries in hash format. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URI.

Used for sending ThreatEntryAdditons to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.

Protobuf type google.cloud.webrisk.v1beta1.RawHashes

Implements

RawHashesOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RawHashes build()
Returns
Type Description
RawHashes

buildPartial()

public RawHashes buildPartial()
Returns
Type Description
RawHashes

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPrefixSize()

public RawHashes.Builder clearPrefixSize()

The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).

int32 prefix_size = 1;

Returns
Type Description
RawHashes.Builder

This builder for chaining.

clearRawHashes()

public RawHashes.Builder clearRawHashes()

The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.

bytes raw_hashes = 2;

Returns
Type Description
RawHashes.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public RawHashes getDefaultInstanceForType()
Returns
Type Description
RawHashes

getDescriptorForType()

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

getPrefixSize()

public int getPrefixSize()

The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).

int32 prefix_size = 1;

Returns
Type Description
int

The prefixSize.

getRawHashes()

public ByteString getRawHashes()

The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.

bytes raw_hashes = 2;

Returns
Type Description
ByteString

The rawHashes.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(RawHashes other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setPrefixSize(int value)

public RawHashes.Builder setPrefixSize(int value)

The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).

int32 prefix_size = 1;

Parameter
Name Description
value int

The prefixSize to set.

Returns
Type Description
RawHashes.Builder

This builder for chaining.

setRawHashes(ByteString value)

public RawHashes.Builder setRawHashes(ByteString value)

The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.

bytes raw_hashes = 2;

Parameter
Name Description
value ByteString

The rawHashes to set.

Returns
Type Description
RawHashes.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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