Class RawHashes.Builder (2.16.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RawHashes build()
Returns
TypeDescription
RawHashes

buildPartial()

public RawHashes buildPartial()
Returns
TypeDescription
RawHashes

clear()

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

clearField(Descriptors.FieldDescriptor field)

public RawHashes.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
RawHashes.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public RawHashes.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
RawHashes.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public RawHashes getDefaultInstanceForType()
Returns
TypeDescription
RawHashes

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The rawHashes.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(RawHashes other)

public RawHashes.Builder mergeFrom(RawHashes other)
Parameter
NameDescription
otherRawHashes
Returns
TypeDescription
RawHashes.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RawHashes.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RawHashes.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

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

The prefixSize to set.

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

The rawHashes to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
RawHashes.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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