Package com.google.webrisk.v1
Class SearchHashesResponse.ThreatHash.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
com.google.webrisk.v1.SearchHashesResponse.ThreatHash.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,SearchHashesResponse.ThreatHashOrBuilder,Cloneable
- Enclosing class:
- SearchHashesResponse.ThreatHash
public static final class SearchHashesResponse.ThreatHash.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
implements SearchHashesResponse.ThreatHashOrBuilder
Contains threat information on a matching hash.Protobuf type
google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash-
Method Summary
Modifier and TypeMethodDescriptionaddAllThreatTypes(Iterable<? extends ThreatType> values) The ThreatList this threat belongs to.addAllThreatTypesValue(Iterable<Integer> values) The ThreatList this threat belongs to.addThreatTypes(ThreatType value) The ThreatList this threat belongs to.addThreatTypesValue(int value) The ThreatList this threat belongs to.build()clear()The cache lifetime for the returned match.A 32 byte SHA256 hash.The ThreatList this threat belongs to.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.TimestampThe cache lifetime for the returned match.com.google.protobuf.Timestamp.BuilderThe cache lifetime for the returned match.com.google.protobuf.TimestampOrBuilderThe cache lifetime for the returned match.com.google.protobuf.ByteStringgetHash()A 32 byte SHA256 hash.getThreatTypes(int index) The ThreatList this threat belongs to.intThe ThreatList this threat belongs to.The ThreatList this threat belongs to.intgetThreatTypesValue(int index) The ThreatList this threat belongs to.The ThreatList this threat belongs to.booleanThe cache lifetime for the returned match.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeExpireTime(com.google.protobuf.Timestamp value) The cache lifetime for the returned match.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setExpireTime(com.google.protobuf.Timestamp value) The cache lifetime for the returned match.setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) The cache lifetime for the returned match.setHash(com.google.protobuf.ByteString value) A 32 byte SHA256 hash.setThreatTypes(int index, ThreatType value) The ThreatList this threat belongs to.setThreatTypesValue(int index, int value) The ThreatList this threat belongs to.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SearchHashesResponse.ThreatHash.Builder>
-
mergeFrom
public SearchHashesResponse.ThreatHash.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SearchHashesResponse.ThreatHash.Builder>- Throws:
IOException
-
getThreatTypesList
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Specified by:
getThreatTypesListin interfaceSearchHashesResponse.ThreatHashOrBuilder- Returns:
- A list containing the threatTypes.
-
getThreatTypesCount
public int getThreatTypesCount()The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Specified by:
getThreatTypesCountin interfaceSearchHashesResponse.ThreatHashOrBuilder- Returns:
- The count of threatTypes.
-
getThreatTypes
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Specified by:
getThreatTypesin interfaceSearchHashesResponse.ThreatHashOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The threatTypes at the given index.
-
setThreatTypes
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Parameters:
index- The index to set the value at.value- The threatTypes to set.- Returns:
- This builder for chaining.
-
addThreatTypes
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Parameters:
value- The threatTypes to add.- Returns:
- This builder for chaining.
-
addAllThreatTypes
public SearchHashesResponse.ThreatHash.Builder addAllThreatTypes(Iterable<? extends ThreatType> values) The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Parameters:
values- The threatTypes to add.- Returns:
- This builder for chaining.
-
clearThreatTypes
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Returns:
- This builder for chaining.
-
getThreatTypesValueList
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Specified by:
getThreatTypesValueListin interfaceSearchHashesResponse.ThreatHashOrBuilder- Returns:
- A list containing the enum numeric values on the wire for threatTypes.
-
getThreatTypesValue
public int getThreatTypesValue(int index) The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Specified by:
getThreatTypesValuein interfaceSearchHashesResponse.ThreatHashOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of threatTypes at the given index.
-
setThreatTypesValue
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Parameters:
index- The index to set the value at.value- The enum numeric value on the wire for threatTypes to set.- Returns:
- This builder for chaining.
-
addThreatTypesValue
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Parameters:
value- The enum numeric value on the wire for threatTypes to add.- Returns:
- This builder for chaining.
-
addAllThreatTypesValue
The ThreatList this threat belongs to. This must contain at least one entry.
repeated .google.cloud.webrisk.v1.ThreatType threat_types = 1;- Parameters:
values- The enum numeric values on the wire for threatTypes to add.- Returns:
- This builder for chaining.
-
getHash
public com.google.protobuf.ByteString getHash()A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.
bytes hash = 2;- Specified by:
getHashin interfaceSearchHashesResponse.ThreatHashOrBuilder- Returns:
- The hash.
-
setHash
A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.
bytes hash = 2;- Parameters:
value- The hash to set.- Returns:
- This builder for chaining.
-
clearHash
A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.
bytes hash = 2;- Returns:
- This builder for chaining.
-
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;- Specified by:
hasExpireTimein interfaceSearchHashesResponse.ThreatHashOrBuilder- Returns:
- Whether the expireTime field is set.
-
getExpireTime
public com.google.protobuf.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;- Specified by:
getExpireTimein interfaceSearchHashesResponse.ThreatHashOrBuilder- Returns:
- The expireTime.
-
setExpireTime
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; -
setExpireTime
public SearchHashesResponse.ThreatHash.Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) 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; -
mergeExpireTime
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; -
clearExpireTime
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; -
getExpireTimeBuilder
public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder()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; -
getExpireTimeOrBuilder
public com.google.protobuf.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;- Specified by:
getExpireTimeOrBuilderin interfaceSearchHashesResponse.ThreatHashOrBuilder
-