Class BusinessUnitSearchResultBuilder

java.lang.Object
com.commercetools.api.models.business_unit_search.BusinessUnitSearchResultBuilder
All Implemented Interfaces:
Builder<BusinessUnitSearchResult>

public class BusinessUnitSearchResultBuilder extends Object implements Builder<BusinessUnitSearchResult>
BusinessUnitSearchResultBuilder
Example to create an instance using the builder pattern

     BusinessUnitSearchResult businessUnitSearchResult = BusinessUnitSearchResult.builder()
             .id("{id}")
             .relevance(0.3)
             .build()
 
  • Constructor Details

    • BusinessUnitSearchResultBuilder

      public BusinessUnitSearchResultBuilder()
  • Method Details

    • id

      id of the BusinessUnit matching the search query.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • relevance

      public BusinessUnitSearchResultBuilder relevance(Double relevance)

      How closely this customer matches the search query.

      Parameters:
      relevance - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      id of the BusinessUnit matching the search query.

      Returns:
      id
    • getRelevance

      public Double getRelevance()

      How closely this customer matches the search query.

      Returns:
      relevance
    • build

      public BusinessUnitSearchResult build()
      builds BusinessUnitSearchResult with checking for non-null required values
      Specified by:
      build in interface Builder<BusinessUnitSearchResult>
      Returns:
      BusinessUnitSearchResult
    • buildUnchecked

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

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

      create builder for BusinessUnitSearchResult instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder