Class 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.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
    implements SearchHashesRequestOrBuilder
     Request to return full hashes matched by the provided hash prefixes.
     
    Protobuf type google.cloud.webrisk.v1.SearchHashesRequest
    • Method Detail

      • getDescriptor

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

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public SearchHashesRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
      • setField

        public SearchHashesRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
      • clearField

        public SearchHashesRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
      • clearOneof

        public SearchHashesRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
      • setRepeatedField

        public SearchHashesRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            int index,
                                                            Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
      • addRepeatedField

        public SearchHashesRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setUnknownFields

        public final SearchHashesRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>
      • mergeUnknownFields

        public final SearchHashesRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SearchHashesRequest.Builder>