Class ProductSearchFacetResultBucketBuilder
java.lang.Object
com.commercetools.api.models.product_search.ProductSearchFacetResultBucketBuilder
- All Implemented Interfaces:
Builder<ProductSearchFacetResultBucket>
public class ProductSearchFacetResultBucketBuilder
extends Object
implements Builder<ProductSearchFacetResultBucket>
ProductSearchFacetResultBucketBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSearchFacetResultBucket productSearchFacetResultBucket = ProductSearchFacetResultBucket.builder()
.name("{name}")
.plusBuckets(bucketsBuilder -> bucketsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddBuckets
(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntry> builder) Contains results of the facet.buckets
(ProductSearchFacetResultBucketEntry... buckets) Contains results of the facet.buckets
(List<ProductSearchFacetResultBucketEntry> buckets) Contains results of the facet.build()
builds ProductSearchFacetResultBucket with checking for non-null required valuesbuilds ProductSearchFacetResultBucket without checking for non-null required valuesContains results of the facet.getName()
Name of the facet.Name of the facet.of()
factory method for an instance of ProductSearchFacetResultBucketBuilderof
(ProductSearchFacetResultBucket template) create builder for ProductSearchFacetResultBucket instanceplusBuckets
(ProductSearchFacetResultBucketEntry... buckets) Contains results of the facet.plusBuckets
(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntryBuilder> builder) Contains results of the facet.setBuckets
(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntry> builder) Contains results of the facet.withBuckets
(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntryBuilder> builder) Contains results of the facet.
-
Constructor Details
-
ProductSearchFacetResultBucketBuilder
public ProductSearchFacetResultBucketBuilder()
-
-
Method Details
-
name
Name of the facet.
- Parameters:
name
- value to be set- Returns:
- Builder
-
buckets
public ProductSearchFacetResultBucketBuilder buckets(ProductSearchFacetResultBucketEntry... buckets) Contains results of the facet.
- Parameters:
buckets
- value to be set- Returns:
- Builder
-
buckets
public ProductSearchFacetResultBucketBuilder buckets(List<ProductSearchFacetResultBucketEntry> buckets) Contains results of the facet.
- Parameters:
buckets
- value to be set- Returns:
- Builder
-
plusBuckets
public ProductSearchFacetResultBucketBuilder plusBuckets(ProductSearchFacetResultBucketEntry... buckets) Contains results of the facet.
- Parameters:
buckets
- value to be set- Returns:
- Builder
-
plusBuckets
public ProductSearchFacetResultBucketBuilder plusBuckets(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntryBuilder> builder) Contains results of the facet.
- Parameters:
builder
- function to build the buckets value- Returns:
- Builder
-
withBuckets
public ProductSearchFacetResultBucketBuilder withBuckets(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntryBuilder> builder) Contains results of the facet.
- Parameters:
builder
- function to build the buckets value- Returns:
- Builder
-
addBuckets
public ProductSearchFacetResultBucketBuilder addBuckets(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntry> builder) Contains results of the facet.
- Parameters:
builder
- function to build the buckets value- Returns:
- Builder
-
setBuckets
public ProductSearchFacetResultBucketBuilder setBuckets(Function<ProductSearchFacetResultBucketEntryBuilder, ProductSearchFacetResultBucketEntry> builder) Contains results of the facet.
- Parameters:
builder
- function to build the buckets value- Returns:
- Builder
-
getName
Name of the facet.
- Returns:
- name
-
getBuckets
Contains results of the facet.
- Returns:
- buckets
-
build
builds ProductSearchFacetResultBucket with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchFacetResultBucket>
- Returns:
- ProductSearchFacetResultBucket
-
buildUnchecked
builds ProductSearchFacetResultBucket without checking for non-null required values- Returns:
- ProductSearchFacetResultBucket
-
of
factory method for an instance of ProductSearchFacetResultBucketBuilder- Returns:
- builder
-
of
create builder for ProductSearchFacetResultBucket instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-