Class SearchKeywordBuilder

java.lang.Object
com.commercetools.api.models.product.SearchKeywordBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<SearchKeyword>

public class SearchKeywordBuilder extends Object implements io.vrap.rmf.base.client.Builder<SearchKeyword>
SearchKeywordBuilder
Example to create an instance using the builder pattern

     SearchKeyword searchKeyword = SearchKeyword.builder()
             .text("{text}")
             .build()
 
  • Constructor Details

    • SearchKeywordBuilder

      public SearchKeywordBuilder()
  • Method Details

    • text

      public SearchKeywordBuilder text(String text)

      Text to return in the result of a suggest query.

      Parameters:
      text - value to be set
      Returns:
      Builder
    • suggestTokenizer

      public SearchKeywordBuilder suggestTokenizer(@Nullable SuggestTokenizer suggestTokenizer)

      If no tokenizer is defined, the text is used as a single token.

      Parameters:
      suggestTokenizer - value to be set
      Returns:
      Builder
    • suggestTokenizer

      public SearchKeywordBuilder suggestTokenizer(Function<SuggestTokenizerBuilder,io.vrap.rmf.base.client.Builder<? extends SuggestTokenizer>> builder)

      If no tokenizer is defined, the text is used as a single token.

      Parameters:
      builder - function to build the suggestTokenizer value
      Returns:
      Builder
    • getText

      public String getText()

      Text to return in the result of a suggest query.

      Returns:
      text
    • getSuggestTokenizer

      @Nullable public SuggestTokenizer getSuggestTokenizer()

      If no tokenizer is defined, the text is used as a single token.

      Returns:
      suggestTokenizer
    • build

      public SearchKeyword build()
      builds SearchKeyword with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<SearchKeyword>
      Returns:
      SearchKeyword
    • buildUnchecked

      public SearchKeyword buildUnchecked()
      builds SearchKeyword without checking for non-null required values
      Returns:
      SearchKeyword
    • of

      public static SearchKeywordBuilder of()
      factory method for an instance of SearchKeywordBuilder
      Returns:
      builder
    • of

      public static SearchKeywordBuilder of(SearchKeyword template)
      create builder for SearchKeyword instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder