Class ProductSearchFacetDistinctBucketSortExpressionBuilder
java.lang.Object
com.commercetools.api.models.product_search.ProductSearchFacetDistinctBucketSortExpressionBuilder
- All Implemented Interfaces:
Builder<ProductSearchFacetDistinctBucketSortExpression>
public class ProductSearchFacetDistinctBucketSortExpressionBuilder
extends Object
implements Builder<ProductSearchFacetDistinctBucketSortExpression>
ProductSearchFacetDistinctBucketSortExpressionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSearchFacetDistinctBucketSortExpression productSearchFacetDistinctBucketSortExpression = ProductSearchFacetDistinctBucketSortExpression.builder()
.by(ProductSearchFacetDistinctBucketSortBy.COUNT)
.order(SearchSortOrder.ASC)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductSearchFacetDistinctBucketSortExpression with checking for non-null required valuesbuilds ProductSearchFacetDistinctBucketSortExpression without checking for non-null required valuesDefines whether to sort by bucket count or key.getBy()Defines whether to sort by bucket count or key.getOrder()Defines the sorting order.of()factory method for an instance of ProductSearchFacetDistinctBucketSortExpressionBuildercreate builder for ProductSearchFacetDistinctBucketSortExpression instanceorder(SearchSortOrder order) Defines the sorting order.
-
Constructor Details
-
ProductSearchFacetDistinctBucketSortExpressionBuilder
public ProductSearchFacetDistinctBucketSortExpressionBuilder()
-
-
Method Details
-
by
public ProductSearchFacetDistinctBucketSortExpressionBuilder by(ProductSearchFacetDistinctBucketSortBy by) Defines whether to sort by bucket count or key.
- Parameters:
by- value to be set- Returns:
- Builder
-
order
Defines the sorting order.
- Parameters:
order- value to be set- Returns:
- Builder
-
getBy
Defines whether to sort by bucket count or key.
- Returns:
- by
-
getOrder
Defines the sorting order.
- Returns:
- order
-
build
builds ProductSearchFacetDistinctBucketSortExpression with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductSearchFacetDistinctBucketSortExpression>- Returns:
- ProductSearchFacetDistinctBucketSortExpression
-
buildUnchecked
builds ProductSearchFacetDistinctBucketSortExpression without checking for non-null required values- Returns:
- ProductSearchFacetDistinctBucketSortExpression
-
of
factory method for an instance of ProductSearchFacetDistinctBucketSortExpressionBuilder- Returns:
- builder
-
of
public static ProductSearchFacetDistinctBucketSortExpressionBuilder of(ProductSearchFacetDistinctBucketSortExpression template) create builder for ProductSearchFacetDistinctBucketSortExpression instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-