Class SearchHashesResponse.ThreatHash (2.10.0)

public static final class SearchHashesResponse.ThreatHash extends GeneratedMessageV3 implements SearchHashesResponse.ThreatHashOrBuilder

Contains threat information on a matching hash.

Protobuf type google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > SearchHashesResponse.ThreatHash

Static Fields

EXPIRE_TIME_FIELD_NUMBER

public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

HASH_FIELD_NUMBER

public static final int HASH_FIELD_NUMBER
Field Value
TypeDescription
int

THREAT_TYPES_FIELD_NUMBER

public static final int THREAT_TYPES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SearchHashesResponse.ThreatHash getDefaultInstance()
Returns
TypeDescription
SearchHashesResponse.ThreatHash

getDescriptor()

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

newBuilder()

public static SearchHashesResponse.ThreatHash.Builder newBuilder()
Returns
TypeDescription
SearchHashesResponse.ThreatHash.Builder

newBuilder(SearchHashesResponse.ThreatHash prototype)

public static SearchHashesResponse.ThreatHash.Builder newBuilder(SearchHashesResponse.ThreatHash prototype)
Parameter
NameDescription
prototypeSearchHashesResponse.ThreatHash
Returns
TypeDescription
SearchHashesResponse.ThreatHash.Builder

parseDelimitedFrom(InputStream input)

public static SearchHashesResponse.ThreatHash parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchHashesResponse.ThreatHash parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SearchHashesResponse.ThreatHash parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SearchHashesResponse.ThreatHash parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SearchHashesResponse.ThreatHash parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SearchHashesResponse.ThreatHash parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SearchHashesResponse.ThreatHash parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchHashesResponse.ThreatHash parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SearchHashesResponse.ThreatHash parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SearchHashesResponse.ThreatHash parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SearchHashesResponse.ThreatHash parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SearchHashesResponse.ThreatHash parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchHashesResponse.ThreatHash
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SearchHashesResponse.ThreatHash> parser()
Returns
TypeDescription
Parser<ThreatHash>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public SearchHashesResponse.ThreatHash getDefaultInstanceForType()
Returns
TypeDescription
SearchHashesResponse.ThreatHash

getExpireTime()

public Timestamp getExpireTime()

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.

.google.protobuf.Timestamp expire_time = 3;

Returns
TypeDescription
Timestamp

The expireTime.

getExpireTimeOrBuilder()

public TimestampOrBuilder getExpireTimeOrBuilder()

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.

.google.protobuf.Timestamp expire_time = 3;

Returns
TypeDescription
TimestampOrBuilder

getHash()

public ByteString getHash()

A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.

bytes hash = 2;

Returns
TypeDescription
ByteString

The hash.

getParserForType()

public Parser<SearchHashesResponse.ThreatHash> getParserForType()
Returns
TypeDescription
Parser<ThreatHash>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getThreatTypes(int index)

public ThreatType getThreatTypes(int index)

The ThreatList this threat belongs to. This must contain at least one entry.

repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
ThreatType

The threatTypes at the given index.

getThreatTypesCount()

public int getThreatTypesCount()

The ThreatList this threat belongs to. This must contain at least one entry.

repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;

Returns
TypeDescription
int

The count of threatTypes.

getThreatTypesList()

public List<ThreatType> getThreatTypesList()

The ThreatList this threat belongs to. This must contain at least one entry.

repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;

Returns
TypeDescription
List<ThreatType>

A list containing the threatTypes.

getThreatTypesValue(int index)

public int getThreatTypesValue(int index)

The ThreatList this threat belongs to. This must contain at least one entry.

repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of threatTypes at the given index.

getThreatTypesValueList()

public List<Integer> getThreatTypesValueList()

The ThreatList this threat belongs to. This must contain at least one entry.

repeated .google.cloud.webrisk.v1beta1.ThreatType threat_types = 1;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for threatTypes.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasExpireTime()

public boolean hasExpireTime()

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.

.google.protobuf.Timestamp expire_time = 3;

Returns
TypeDescription
boolean

Whether the expireTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SearchHashesResponse.ThreatHash.Builder newBuilderForType()
Returns
TypeDescription
SearchHashesResponse.ThreatHash.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SearchHashesResponse.ThreatHash.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SearchHashesResponse.ThreatHash.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SearchHashesResponse.ThreatHash.Builder toBuilder()
Returns
TypeDescription
SearchHashesResponse.ThreatHash.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException