Class ProductSearchResultBuilder
- All Implemented Interfaces:
Builder<ProductSearchResult>
Example to create an instance using the builder pattern
ProductSearchResult productSearchResult = ProductSearchResult.builder()
.id("{id}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSearchResult with checking for non-null required valuesbuilds ProductSearchResult without checking for non-null required valuesgetId()
id
of the Product that matches the search query.Information about which Product Variants match the search query.Projected data of the Product withid
.id
of the Product that matches the search query.matchingVariants
(ProductSearchMatchingVariants matchingVariants) Information about which Product Variants match the search query.matchingVariants
(Function<ProductSearchMatchingVariantsBuilder, ProductSearchMatchingVariantsBuilder> builder) Information about which Product Variants match the search query.static ProductSearchResultBuilder
of()
factory method for an instance of ProductSearchResultBuilderstatic ProductSearchResultBuilder
of
(ProductSearchResult template) create builder for ProductSearchResult instanceproductProjection
(ProductProjection productProjection) Projected data of the Product withid
.Projected data of the Product withid
.withMatchingVariants
(Function<ProductSearchMatchingVariantsBuilder, ProductSearchMatchingVariants> builder) Information about which Product Variants match the search query.Projected data of the Product withid
.
-
Constructor Details
-
ProductSearchResultBuilder
public ProductSearchResultBuilder()
-
-
Method Details
-
id
id
of the Product that matches the search query.- Parameters:
id
- value to be set- Returns:
- Builder
-
matchingVariants
public ProductSearchResultBuilder matchingVariants(Function<ProductSearchMatchingVariantsBuilder, ProductSearchMatchingVariantsBuilder> builder) Information about which Product Variants match the search query. Only present if
markMatchingVariants
is set totrue
in the ProductSearchRequest.- Parameters:
builder
- function to build the matchingVariants value- Returns:
- Builder
-
withMatchingVariants
public ProductSearchResultBuilder withMatchingVariants(Function<ProductSearchMatchingVariantsBuilder, ProductSearchMatchingVariants> builder) Information about which Product Variants match the search query. Only present if
markMatchingVariants
is set totrue
in the ProductSearchRequest.- Parameters:
builder
- function to build the matchingVariants value- Returns:
- Builder
-
matchingVariants
public ProductSearchResultBuilder matchingVariants(@Nullable ProductSearchMatchingVariants matchingVariants) Information about which Product Variants match the search query. Only present if
markMatchingVariants
is set totrue
in the ProductSearchRequest.- Parameters:
matchingVariants
- value to be set- Returns:
- Builder
-
productProjection
public ProductSearchResultBuilder productProjection(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) Projected data of the Product with
id
. Only present if data integration with Product Projection parameters is requested.- Parameters:
builder
- function to build the productProjection value- Returns:
- Builder
-
withProductProjection
public ProductSearchResultBuilder withProductProjection(Function<ProductProjectionBuilder, ProductProjection> builder) Projected data of the Product with
id
. Only present if data integration with Product Projection parameters is requested.- Parameters:
builder
- function to build the productProjection value- Returns:
- Builder
-
productProjection
Projected data of the Product with
id
. Only present if data integration with Product Projection parameters is requested.- Parameters:
productProjection
- value to be set- Returns:
- Builder
-
getId
id
of the Product that matches the search query.- Returns:
- id
-
getMatchingVariants
Information about which Product Variants match the search query. Only present if
markMatchingVariants
is set totrue
in the ProductSearchRequest.- Returns:
- matchingVariants
-
getProductProjection
Projected data of the Product with
id
. Only present if data integration with Product Projection parameters is requested.- Returns:
- productProjection
-
build
builds ProductSearchResult with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchResult>
- Returns:
- ProductSearchResult
-
buildUnchecked
builds ProductSearchResult without checking for non-null required values- Returns:
- ProductSearchResult
-
of
factory method for an instance of ProductSearchResultBuilder- Returns:
- builder
-
of
create builder for ProductSearchResult instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-