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.v1.RawHashes
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public RawHashes.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public RawHashes buildPartial()
Returns
clear()
public RawHashes.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public RawHashes.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public RawHashes.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
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).
In practice this is almost always 4, except in exceptional circumstances.
int32 prefix_size = 1;
Returns
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
clone()
public RawHashes.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public RawHashes getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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).
In practice this is almost always 4, except in exceptional circumstances.
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
public RawHashes.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public RawHashes.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(RawHashes other)
public RawHashes.Builder mergeFrom(RawHashes other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final RawHashes.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public RawHashes.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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).
In practice this is almost always 4, except in exceptional circumstances.
int32 prefix_size = 1;
Parameter
Name | Description |
value | int
The prefixSize to set.
|
Returns
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
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public RawHashes.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final RawHashes.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides