Class VariantBulkUpdateResponseBuilder
java.lang.Object
com.commercetools.api.models.variant.VariantBulkUpdateResponseBuilder
- All Implemented Interfaces:
Builder<VariantBulkUpdateResponse>
public class VariantBulkUpdateResponseBuilder
extends Object
implements Builder<VariantBulkUpdateResponse>
VariantBulkUpdateResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
VariantBulkUpdateResponse variantBulkUpdateResponse = VariantBulkUpdateResponse.builder()
.successCount(0.3)
.failureCount(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds VariantBulkUpdateResponse with checking for non-null required valuesbuilds VariantBulkUpdateResponse without checking for non-null required valuesfailureCount(Integer failureCount) Number of Variants that failed to update.Number of Variants that failed to update.Results for each Variant in the request, in the same order as theitemsin the request body.Number of Variants that were successfully updated.of()factory method for an instance of VariantBulkUpdateResponseBuilderof(VariantBulkUpdateResponse template) create builder for VariantBulkUpdateResponse instanceplusResults(VariantBulkUpdateResult... results) Results for each Variant in the request, in the same order as theitemsin the request body.plusResults(Function<VariantBulkUpdateResultBuilder, Builder<? extends VariantBulkUpdateResult>> builder) Results for each Variant in the request, in the same order as theitemsin the request body.results(VariantBulkUpdateResult... results) Results for each Variant in the request, in the same order as theitemsin the request body.results(List<VariantBulkUpdateResult> results) Results for each Variant in the request, in the same order as theitemsin the request body.successCount(Integer successCount) Number of Variants that were successfully updated.withResults(Function<VariantBulkUpdateResultBuilder, Builder<? extends VariantBulkUpdateResult>> builder) Results for each Variant in the request, in the same order as theitemsin the request body.
-
Constructor Details
-
VariantBulkUpdateResponseBuilder
public VariantBulkUpdateResponseBuilder()
-
-
Method Details
-
successCount
Number of Variants that were successfully updated.
- Parameters:
successCount- value to be set- Returns:
- Builder
-
failureCount
Number of Variants that failed to update.
- Parameters:
failureCount- value to be set- Returns:
- Builder
-
results
Results for each Variant in the request, in the same order as the
itemsin the request body.- Parameters:
results- value to be set- Returns:
- Builder
-
results
Results for each Variant in the request, in the same order as the
itemsin the request body.- Parameters:
results- value to be set- Returns:
- Builder
-
plusResults
Results for each Variant in the request, in the same order as the
itemsin the request body.- Parameters:
results- value to be set- Returns:
- Builder
-
plusResults
public VariantBulkUpdateResponseBuilder plusResults(Function<VariantBulkUpdateResultBuilder, Builder<? extends VariantBulkUpdateResult>> builder) Results for each Variant in the request, in the same order as the
itemsin the request body.- Parameters:
builder- function to build the results value- Returns:
- Builder
-
withResults
public VariantBulkUpdateResponseBuilder withResults(Function<VariantBulkUpdateResultBuilder, Builder<? extends VariantBulkUpdateResult>> builder) Results for each Variant in the request, in the same order as the
itemsin the request body.- Parameters:
builder- function to build the results value- Returns:
- Builder
-
getSuccessCount
Number of Variants that were successfully updated.
- Returns:
- successCount
-
getFailureCount
Number of Variants that failed to update.
- Returns:
- failureCount
-
getResults
Results for each Variant in the request, in the same order as the
itemsin the request body.- Returns:
- results
-
build
builds VariantBulkUpdateResponse with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantBulkUpdateResponse>- Returns:
- VariantBulkUpdateResponse
-
buildUnchecked
builds VariantBulkUpdateResponse without checking for non-null required values- Returns:
- VariantBulkUpdateResponse
-
of
factory method for an instance of VariantBulkUpdateResponseBuilder- Returns:
- builder
-
of
create builder for VariantBulkUpdateResponse instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-