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()idof the Product that matches the search query.Information about which Product Variants match the search query.Deprecated.idof 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 ProductSearchResultBuilderof()factory method for an instance of ProductSearchResultBuilderstatic ProductSearchResultBuilderof(ProductSearchResult template) create builder for ProductSearchResult instanceproductProjection(ProductProjection productProjection) Deprecated.Deprecated.withMatchingVariants(Function<ProductSearchMatchingVariantsBuilder, ProductSearchMatchingVariants> builder) Information about which Product Variants match the search query.Deprecated.
-
Constructor Details
-
ProductSearchResultBuilder
public ProductSearchResultBuilder()
-
-
Method Details
-
id
idof 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
markMatchingVariantsis set totruein 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
markMatchingVariantsis set totruein 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
markMatchingVariantsis set totruein the ProductSearchRequest.- Parameters:
matchingVariants- value to be set- Returns:
- Builder
-
productProjection
@Deprecated public ProductSearchResultBuilder productProjection(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) Deprecated.Projected data of the Product with
id. Only present if deprecated data integration with Product Projection parameters is requested.- Parameters:
builder- function to build the productProjection value- Returns:
- Builder
-
withProductProjection
@Deprecated public ProductSearchResultBuilder withProductProjection(Function<ProductProjectionBuilder, ProductProjection> builder) Deprecated.Projected data of the Product with
id. Only present if deprecated data integration with Product Projection parameters is requested.- Parameters:
builder- function to build the productProjection value- Returns:
- Builder
-
productProjection
@Deprecated public ProductSearchResultBuilder productProjection(@Nullable ProductProjection productProjection) Deprecated.Projected data of the Product with
id. Only present if deprecated data integration with Product Projection parameters is requested.- Parameters:
productProjection- value to be set- Returns:
- Builder
-
getId
idof the Product that matches the search query.- Returns:
- id
-
getMatchingVariants
Information about which Product Variants match the search query. Only present if
markMatchingVariantsis set totruein the ProductSearchRequest.- Returns:
- matchingVariants
-
getProductProjection
Deprecated.Projected data of the Product with
id. Only present if deprecated data integration with Product Projection parameters is requested.- Returns:
- productProjection
-
build
builds ProductSearchResult with checking for non-null required values- Specified by:
buildin 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
-