Class SearchHashesRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchHashesRequest.Builder>
com.google.webrisk.v1.SearchHashesRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SearchHashesRequestOrBuilder, Cloneable
Enclosing class:
SearchHashesRequest

public static final class SearchHashesRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<SearchHashesRequest.Builder> implements SearchHashesRequestOrBuilder
 Request to return full hashes matched by the provided hash prefixes.
 
Protobuf type google.cloud.webrisk.v1.SearchHashesRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SearchHashesRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SearchHashesRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SearchHashesRequest.Builder>
    • getDefaultInstanceForType

      public SearchHashesRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SearchHashesRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SearchHashesRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SearchHashesRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchHashesRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SearchHashesRequest.Builder>
    • mergeFrom

      public SearchHashesRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SearchHashesRequest.Builder>
      Throws:
      IOException
    • getHashPrefix

      public com.google.protobuf.ByteString getHashPrefix()
       A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
       hash. For JSON requests, this field is base64-encoded.
       Note that if this parameter is provided by a URI, it must be encoded using
       the web safe base64 variant (RFC 4648).
       
      bytes hash_prefix = 1;
      Specified by:
      getHashPrefix in interface SearchHashesRequestOrBuilder
      Returns:
      The hashPrefix.
    • setHashPrefix

      public SearchHashesRequest.Builder setHashPrefix(com.google.protobuf.ByteString value)
       A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
       hash. For JSON requests, this field is base64-encoded.
       Note that if this parameter is provided by a URI, it must be encoded using
       the web safe base64 variant (RFC 4648).
       
      bytes hash_prefix = 1;
      Parameters:
      value - The hashPrefix to set.
      Returns:
      This builder for chaining.
    • clearHashPrefix

      public SearchHashesRequest.Builder clearHashPrefix()
       A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
       hash. For JSON requests, this field is base64-encoded.
       Note that if this parameter is provided by a URI, it must be encoded using
       the web safe base64 variant (RFC 4648).
       
      bytes hash_prefix = 1;
      Returns:
      This builder for chaining.
    • getThreatTypesList

      public List<ThreatType> getThreatTypesList()
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreatTypesList in interface SearchHashesRequestOrBuilder
      Returns:
      A list containing the threatTypes.
    • getThreatTypesCount

      public int getThreatTypesCount()
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreatTypesCount in interface SearchHashesRequestOrBuilder
      Returns:
      The count of threatTypes.
    • getThreatTypes

      public ThreatType getThreatTypes(int index)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreatTypes in interface SearchHashesRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The threatTypes at the given index.
    • setThreatTypes

      public SearchHashesRequest.Builder setThreatTypes(int index, ThreatType value)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The threatTypes to set.
      Returns:
      This builder for chaining.
    • addThreatTypes

      public SearchHashesRequest.Builder addThreatTypes(ThreatType value)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The threatTypes to add.
      Returns:
      This builder for chaining.
    • addAllThreatTypes

      public SearchHashesRequest.Builder addAllThreatTypes(Iterable<? extends ThreatType> values)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The threatTypes to add.
      Returns:
      This builder for chaining.
    • clearThreatTypes

      public SearchHashesRequest.Builder clearThreatTypes()
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getThreatTypesValueList

      public List<Integer> getThreatTypesValueList()
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreatTypesValueList in interface SearchHashesRequestOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for threatTypes.
    • getThreatTypesValue

      public int getThreatTypesValue(int index)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreatTypesValue in interface SearchHashesRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of threatTypes at the given index.
    • setThreatTypesValue

      public SearchHashesRequest.Builder setThreatTypesValue(int index, int value)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      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

      public SearchHashesRequest.Builder addThreatTypesValue(int value)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for threatTypes to add.
      Returns:
      This builder for chaining.
    • addAllThreatTypesValue

      public SearchHashesRequest.Builder addAllThreatTypesValue(Iterable<Integer> values)
       Required. The ThreatLists to search in. Multiple ThreatLists may be
       specified.
       
      repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The enum numeric values on the wire for threatTypes to add.
      Returns:
      This builder for chaining.