Class SearchRequest.BoostSpec.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchRequest.BoostSpec.Builder>
com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder
All Implemented Interfaces:
SearchRequest.BoostSpecOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SearchRequest.BoostSpec

public static final class SearchRequest.BoostSpec.Builder extends com.google.protobuf.GeneratedMessage.Builder<SearchRequest.BoostSpec.Builder> implements SearchRequest.BoostSpecOrBuilder
 Boost specification to boost certain items.
 
Protobuf type google.cloud.retail.v2alpha.SearchRequest.BoostSpec
  • 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<SearchRequest.BoostSpec.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<SearchRequest.BoostSpec.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<SearchRequest.BoostSpec.Builder>
    • getDefaultInstanceForType

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

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

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

      public SearchRequest.BoostSpec.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<SearchRequest.BoostSpec.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<SearchRequest.BoostSpec.Builder>
    • mergeFrom

      public SearchRequest.BoostSpec.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<SearchRequest.BoostSpec.Builder>
      Throws:
      IOException
    • getConditionBoostSpecsList

      public List<SearchRequest.BoostSpec.ConditionBoostSpec> getConditionBoostSpecsList()
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
      Specified by:
      getConditionBoostSpecsList in interface SearchRequest.BoostSpecOrBuilder
    • getConditionBoostSpecsCount

      public int getConditionBoostSpecsCount()
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
      Specified by:
      getConditionBoostSpecsCount in interface SearchRequest.BoostSpecOrBuilder
    • getConditionBoostSpecs

      public SearchRequest.BoostSpec.ConditionBoostSpec getConditionBoostSpecs(int index)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
      Specified by:
      getConditionBoostSpecs in interface SearchRequest.BoostSpecOrBuilder
    • setConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder setConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec value)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • setConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder setConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • addConditionBoostSpecs

       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • addConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder addConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec value)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • addConditionBoostSpecs

       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • addConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder addConditionBoostSpecs(int index, SearchRequest.BoostSpec.ConditionBoostSpec.Builder builderForValue)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • addAllConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder addAllConditionBoostSpecs(Iterable<? extends SearchRequest.BoostSpec.ConditionBoostSpec> values)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • clearConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder clearConditionBoostSpecs()
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • removeConditionBoostSpecs

      public SearchRequest.BoostSpec.Builder removeConditionBoostSpecs(int index)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • getConditionBoostSpecsBuilder

      public SearchRequest.BoostSpec.ConditionBoostSpec.Builder getConditionBoostSpecsBuilder(int index)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • getConditionBoostSpecsOrBuilder

      public SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder getConditionBoostSpecsOrBuilder(int index)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
      Specified by:
      getConditionBoostSpecsOrBuilder in interface SearchRequest.BoostSpecOrBuilder
    • getConditionBoostSpecsOrBuilderList

      public List<? extends SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder> getConditionBoostSpecsOrBuilderList()
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
      Specified by:
      getConditionBoostSpecsOrBuilderList in interface SearchRequest.BoostSpecOrBuilder
    • addConditionBoostSpecsBuilder

      public SearchRequest.BoostSpec.ConditionBoostSpec.Builder addConditionBoostSpecsBuilder()
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • addConditionBoostSpecsBuilder

      public SearchRequest.BoostSpec.ConditionBoostSpec.Builder addConditionBoostSpecsBuilder(int index)
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • getConditionBoostSpecsBuilderList

      public List<SearchRequest.BoostSpec.ConditionBoostSpec.Builder> getConditionBoostSpecsBuilderList()
       Condition boost specifications. If a product matches multiple conditions
       in the specifications, boost scores from these specifications are all
       applied and combined in a non-linear way. Maximum number of
       specifications is 20.
       
      repeated .google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;
    • hasSkipBoostSpecValidation

      public boolean hasSkipBoostSpecValidation()
       Whether to skip boostspec validation. If this field is set to true,
       invalid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will be ignored and valid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will still be applied.
       
      optional bool skip_boost_spec_validation = 2;
      Specified by:
      hasSkipBoostSpecValidation in interface SearchRequest.BoostSpecOrBuilder
      Returns:
      Whether the skipBoostSpecValidation field is set.
    • getSkipBoostSpecValidation

      public boolean getSkipBoostSpecValidation()
       Whether to skip boostspec validation. If this field is set to true,
       invalid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will be ignored and valid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will still be applied.
       
      optional bool skip_boost_spec_validation = 2;
      Specified by:
      getSkipBoostSpecValidation in interface SearchRequest.BoostSpecOrBuilder
      Returns:
      The skipBoostSpecValidation.
    • setSkipBoostSpecValidation

      public SearchRequest.BoostSpec.Builder setSkipBoostSpecValidation(boolean value)
       Whether to skip boostspec validation. If this field is set to true,
       invalid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will be ignored and valid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will still be applied.
       
      optional bool skip_boost_spec_validation = 2;
      Parameters:
      value - The skipBoostSpecValidation to set.
      Returns:
      This builder for chaining.
    • clearSkipBoostSpecValidation

      public SearchRequest.BoostSpec.Builder clearSkipBoostSpecValidation()
       Whether to skip boostspec validation. If this field is set to true,
       invalid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will be ignored and valid
       [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs]
       will still be applied.
       
      optional bool skip_boost_spec_validation = 2;
      Returns:
      This builder for chaining.