Class ProductAddedToCategoryMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductAddedToCategoryMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductAddedToCategoryMessagePayload>
public class ProductAddedToCategoryMessagePayloadBuilder
extends Object
implements Builder<ProductAddedToCategoryMessagePayload>
ProductAddedToCategoryMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductAddedToCategoryMessagePayload productAddedToCategoryMessagePayload = ProductAddedToCategoryMessagePayload.builder()
.category(categoryBuilder -> categoryBuilder)
.staged(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductAddedToCategoryMessagePayload with checking for non-null required valuesbuilds ProductAddedToCategoryMessagePayload without checking for non-null required valuescategory
(CategoryReference category) Category the Product was added to.Category the Product was added to.Category the Product was added to.Whether the update was only applied to the staged Product Projection.of()
factory method for an instance of ProductAddedToCategoryMessagePayloadBuilderof
(ProductAddedToCategoryMessagePayload template) create builder for ProductAddedToCategoryMessagePayload instanceWhether the update was only applied to the staged Product Projection.Category the Product was added to.
-
Constructor Details
-
ProductAddedToCategoryMessagePayloadBuilder
public ProductAddedToCategoryMessagePayloadBuilder()
-
-
Method Details
-
category
public ProductAddedToCategoryMessagePayloadBuilder category(Function<CategoryReferenceBuilder, CategoryReferenceBuilder> builder) Category the Product was added to.
- Parameters:
builder
- function to build the category value- Returns:
- Builder
-
withCategory
public ProductAddedToCategoryMessagePayloadBuilder withCategory(Function<CategoryReferenceBuilder, CategoryReference> builder) Category the Product was added to.
- Parameters:
builder
- function to build the category value- Returns:
- Builder
-
category
Category the Product was added to.
- Parameters:
category
- value to be set- Returns:
- Builder
-
staged
Whether the update was only applied to the staged Product Projection.
- Parameters:
staged
- value to be set- Returns:
- Builder
-
getCategory
Category the Product was added to.
- Returns:
- category
-
getStaged
Whether the update was only applied to the staged Product Projection.
- Returns:
- staged
-
build
builds ProductAddedToCategoryMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductAddedToCategoryMessagePayload>
- Returns:
- ProductAddedToCategoryMessagePayload
-
buildUnchecked
builds ProductAddedToCategoryMessagePayload without checking for non-null required values- Returns:
- ProductAddedToCategoryMessagePayload
-
of
factory method for an instance of ProductAddedToCategoryMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductAddedToCategoryMessagePayloadBuilder of(ProductAddedToCategoryMessagePayload template) create builder for ProductAddedToCategoryMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-