Class SuggestionResultBuilder

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

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

     SuggestionResult suggestionResult = SuggestionResult.builder()
             .plus/searchKeywords.[a-z]{2}(-[A-Z]{2})?/(/searchKeywords.[a-z]{2}(-[A-Z]{2})?/Builder -> /searchKeywords.[a-z]{2}(-[A-Z]{2})?/Builder)
             .build()
 
  • Constructor Details

    • SuggestionResultBuilder

      public SuggestionResultBuilder()
  • Method Details

    • values

      public SuggestionResultBuilder values(Map<String,List<Suggestion>> values)
      assign pattern properties to the builder
      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      public SuggestionResultBuilder addValue(String key, List<Suggestion> value)
      assign a pattern property to the builder
      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • getValues

      public Map<String,List<Suggestion>> getValues()
      values of pattern properties
      Returns:
      pattern properties
    • build

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

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

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

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