Class GeneralCategoryRecommendationPagedQueryResponseBuilder
java.lang.Object
com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponseBuilder
- All Implemented Interfaces:
Builder<GeneralCategoryRecommendationPagedQueryResponse>
public class GeneralCategoryRecommendationPagedQueryResponseBuilder
extends Object
implements Builder<GeneralCategoryRecommendationPagedQueryResponse>
GeneralCategoryRecommendationPagedQueryResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GeneralCategoryRecommendationPagedQueryResponse generalCategoryRecommendationPagedQueryResponse = GeneralCategoryRecommendationPagedQueryResponse.builder()
.count(0.3)
.total(0.3)
.offset(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd the value to the results using the builder functionbuild()
builds GeneralCategoryRecommendationPagedQueryResponse with checking for non-null required valuesbuilds GeneralCategoryRecommendationPagedQueryResponse without checking for non-null required valuesset the value to the countgetCount()
value of count}Number of elements skipped.value of results}getTotal()
value of total}of()
factory method for an instance of GeneralCategoryRecommendationPagedQueryResponseBuildercreate builder for GeneralCategoryRecommendationPagedQueryResponse instanceNumber of elements skipped.plusResults
(GeneralCategoryRecommendation... results) add values to the resultsplusResults
(Function<GeneralCategoryRecommendationBuilder, GeneralCategoryRecommendationBuilder> builder) add the value to the results using the builder functionresults
(GeneralCategoryRecommendation... results) set values to the resultsresults
(List<GeneralCategoryRecommendation> results) set value to the resultsset the value to the results using the builder functionset the value to the totalwithResults
(Function<GeneralCategoryRecommendationBuilder, GeneralCategoryRecommendationBuilder> builder) set the value to the results using the builder function
-
Constructor Details
-
GeneralCategoryRecommendationPagedQueryResponseBuilder
public GeneralCategoryRecommendationPagedQueryResponseBuilder()
-
-
Method Details
-
count
set the value to the count- Parameters:
count
- value to be set- Returns:
- Builder
-
total
set the value to the total- Parameters:
total
- value to be set- Returns:
- Builder
-
offset
Number of elements skipped.
- Parameters:
offset
- value to be set- Returns:
- Builder
-
results
public GeneralCategoryRecommendationPagedQueryResponseBuilder results(GeneralCategoryRecommendation... results) set values to the results- Parameters:
results
- value to be set- Returns:
- Builder
-
results
public GeneralCategoryRecommendationPagedQueryResponseBuilder results(List<GeneralCategoryRecommendation> results) set value to the results- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
public GeneralCategoryRecommendationPagedQueryResponseBuilder plusResults(GeneralCategoryRecommendation... results) add values to the results- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
public GeneralCategoryRecommendationPagedQueryResponseBuilder plusResults(Function<GeneralCategoryRecommendationBuilder, GeneralCategoryRecommendationBuilder> builder) add the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
withResults
public GeneralCategoryRecommendationPagedQueryResponseBuilder withResults(Function<GeneralCategoryRecommendationBuilder, GeneralCategoryRecommendationBuilder> builder) set the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
addResults
public GeneralCategoryRecommendationPagedQueryResponseBuilder addResults(Function<GeneralCategoryRecommendationBuilder, GeneralCategoryRecommendation> builder) add the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
setResults
public GeneralCategoryRecommendationPagedQueryResponseBuilder setResults(Function<GeneralCategoryRecommendationBuilder, GeneralCategoryRecommendation> builder) set the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
getCount
value of count}- Returns:
- count
-
getTotal
value of total}- Returns:
- total
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getResults
value of results}- Returns:
- results
-
build
builds GeneralCategoryRecommendationPagedQueryResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<GeneralCategoryRecommendationPagedQueryResponse>
- Returns:
- GeneralCategoryRecommendationPagedQueryResponse
-
buildUnchecked
builds GeneralCategoryRecommendationPagedQueryResponse without checking for non-null required values- Returns:
- GeneralCategoryRecommendationPagedQueryResponse
-
of
factory method for an instance of GeneralCategoryRecommendationPagedQueryResponseBuilder- Returns:
- builder
-
of
public static GeneralCategoryRecommendationPagedQueryResponseBuilder of(GeneralCategoryRecommendationPagedQueryResponse template) create builder for GeneralCategoryRecommendationPagedQueryResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-