Class SimilarProductSearchRequestBuilder
- All Implemented Interfaces:
Builder<SimilarProductSearchRequest>
Example to create an instance using the builder pattern
SimilarProductSearchRequest similarProductSearchRequest = SimilarProductSearchRequest.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionArray of length 2 of ProductSetSelectorbuild()
builds SimilarProductSearchRequest with checking for non-null required valuesbuilds SimilarProductSearchRequest without checking for non-null required valuesconfidenceMax
(Double confidenceMax) set the value to the confidenceMaxconfidenceMin
(Double confidenceMin) set the value to the confidenceMincurrencyCode
(String currencyCode) The three-digit currency code to compare prices in.value of confidenceMax}value of confidenceMin}The three-digit currency code to compare prices in.language tag used to prioritize language for text comparisons.getLimit()
Number of results requested.Number of elements skipped.Array of length 2 of ProductSetSelectorsimilarityMeasures
defines the attributes taken into account to measure product similarity.language tag used to prioritize language for text comparisons.Number of results requested.of()
factory method for an instance of SimilarProductSearchRequestBuilderof
(SimilarProductSearchRequest template) create builder for SimilarProductSearchRequest instanceNumber of elements skipped.plusProductSetSelectors
(ProductSetSelector... productSetSelectors) Array of length 2 of ProductSetSelectorArray of length 2 of ProductSetSelectorproductSetSelectors
(ProductSetSelector... productSetSelectors) Array of length 2 of ProductSetSelectorproductSetSelectors
(List<ProductSetSelector> productSetSelectors) Array of length 2 of ProductSetSelectorArray of length 2 of ProductSetSelectorsimilarityMeasures
(SimilarityMeasures similarityMeasures) similarityMeasures
defines the attributes taken into account to measure product similarity.similarityMeasures
defines the attributes taken into account to measure product similarity.Array of length 2 of ProductSetSelectorsimilarityMeasures
defines the attributes taken into account to measure product similarity.
-
Constructor Details
-
SimilarProductSearchRequestBuilder
public SimilarProductSearchRequestBuilder()
-
-
Method Details
-
limit
Number of results requested.
- Parameters:
limit
- value to be set- Returns:
- Builder
-
offset
Number of elements skipped.
- Parameters:
offset
- value to be set- Returns:
- Builder
-
language
language tag used to prioritize language for text comparisons.
- Parameters:
language
- value to be set- Returns:
- Builder
-
currencyCode
The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.
- Parameters:
currencyCode
- value to be set- Returns:
- Builder
-
similarityMeasures
public SimilarProductSearchRequestBuilder similarityMeasures(Function<SimilarityMeasuresBuilder, SimilarityMeasuresBuilder> builder) similarityMeasures
defines the attributes taken into account to measure product similarity.- Parameters:
builder
- function to build the similarityMeasures value- Returns:
- Builder
-
withSimilarityMeasures
public SimilarProductSearchRequestBuilder withSimilarityMeasures(Function<SimilarityMeasuresBuilder, SimilarityMeasures> builder) similarityMeasures
defines the attributes taken into account to measure product similarity.- Parameters:
builder
- function to build the similarityMeasures value- Returns:
- Builder
-
similarityMeasures
public SimilarProductSearchRequestBuilder similarityMeasures(@Nullable SimilarityMeasures similarityMeasures) similarityMeasures
defines the attributes taken into account to measure product similarity.- Parameters:
similarityMeasures
- value to be set- Returns:
- Builder
-
productSetSelectors
public SimilarProductSearchRequestBuilder productSetSelectors(@Nullable ProductSetSelector... productSetSelectors) Array of length 2 of ProductSetSelector
- Parameters:
productSetSelectors
- value to be set- Returns:
- Builder
-
productSetSelectors
public SimilarProductSearchRequestBuilder productSetSelectors(@Nullable List<ProductSetSelector> productSetSelectors) Array of length 2 of ProductSetSelector
- Parameters:
productSetSelectors
- value to be set- Returns:
- Builder
-
plusProductSetSelectors
public SimilarProductSearchRequestBuilder plusProductSetSelectors(@Nullable ProductSetSelector... productSetSelectors) Array of length 2 of ProductSetSelector
- Parameters:
productSetSelectors
- value to be set- Returns:
- Builder
-
plusProductSetSelectors
public SimilarProductSearchRequestBuilder plusProductSetSelectors(Function<ProductSetSelectorBuilder, ProductSetSelectorBuilder> builder) Array of length 2 of ProductSetSelector
- Parameters:
builder
- function to build the productSetSelectors value- Returns:
- Builder
-
withProductSetSelectors
public SimilarProductSearchRequestBuilder withProductSetSelectors(Function<ProductSetSelectorBuilder, ProductSetSelectorBuilder> builder) Array of length 2 of ProductSetSelector
- Parameters:
builder
- function to build the productSetSelectors value- Returns:
- Builder
-
addProductSetSelectors
public SimilarProductSearchRequestBuilder addProductSetSelectors(Function<ProductSetSelectorBuilder, ProductSetSelector> builder) Array of length 2 of ProductSetSelector
- Parameters:
builder
- function to build the productSetSelectors value- Returns:
- Builder
-
setProductSetSelectors
public SimilarProductSearchRequestBuilder setProductSetSelectors(Function<ProductSetSelectorBuilder, ProductSetSelector> builder) Array of length 2 of ProductSetSelector
- Parameters:
builder
- function to build the productSetSelectors value- Returns:
- Builder
-
confidenceMin
set the value to the confidenceMin- Parameters:
confidenceMin
- value to be set- Returns:
- Builder
-
confidenceMax
set the value to the confidenceMax- Parameters:
confidenceMax
- value to be set- Returns:
- Builder
-
getLimit
Number of results requested.
- Returns:
- limit
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getLanguage
language tag used to prioritize language for text comparisons.
- Returns:
- language
-
getCurrencyCode
The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.
- Returns:
- currencyCode
-
getSimilarityMeasures
similarityMeasures
defines the attributes taken into account to measure product similarity.- Returns:
- similarityMeasures
-
getProductSetSelectors
Array of length 2 of ProductSetSelector
- Returns:
- productSetSelectors
-
getConfidenceMin
value of confidenceMin}- Returns:
- confidenceMin
-
getConfidenceMax
value of confidenceMax}- Returns:
- confidenceMax
-
build
builds SimilarProductSearchRequest with checking for non-null required values- Specified by:
build
in interfaceBuilder<SimilarProductSearchRequest>
- Returns:
- SimilarProductSearchRequest
-
buildUnchecked
builds SimilarProductSearchRequest without checking for non-null required values- Returns:
- SimilarProductSearchRequest
-
of
factory method for an instance of SimilarProductSearchRequestBuilder- Returns:
- builder
-
of
create builder for SimilarProductSearchRequest instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-