Class ProductCreatedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductCreatedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductCreatedMessagePayload>
public class ProductCreatedMessagePayloadBuilder
extends Object
implements Builder<ProductCreatedMessagePayload>
ProductCreatedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductCreatedMessagePayload productCreatedMessagePayload = ProductCreatedMessagePayload.builder()
.productProjection(productProjectionBuilder -> productProjectionBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductCreatedMessagePayload with checking for non-null required valuesbuilds ProductCreatedMessagePayload without checking for non-null required valuesThe staged Product Projection of the Product at the time of creation.of()
factory method for an instance of ProductCreatedMessagePayloadBuilderof
(ProductCreatedMessagePayload template) create builder for ProductCreatedMessagePayload instanceproductProjection
(ProductProjection productProjection) The staged Product Projection of the Product at the time of creation.The staged Product Projection of the Product at the time of creation.The staged Product Projection of the Product at the time of creation.
-
Constructor Details
-
ProductCreatedMessagePayloadBuilder
public ProductCreatedMessagePayloadBuilder()
-
-
Method Details
-
productProjection
public ProductCreatedMessagePayloadBuilder productProjection(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) The staged Product Projection of the Product at the time of creation.
- Parameters:
builder
- function to build the productProjection value- Returns:
- Builder
-
withProductProjection
public ProductCreatedMessagePayloadBuilder withProductProjection(Function<ProductProjectionBuilder, ProductProjection> builder) The staged Product Projection of the Product at the time of creation.
- Parameters:
builder
- function to build the productProjection value- Returns:
- Builder
-
productProjection
The staged Product Projection of the Product at the time of creation.
- Parameters:
productProjection
- value to be set- Returns:
- Builder
-
getProductProjection
The staged Product Projection of the Product at the time of creation.
- Returns:
- productProjection
-
build
builds ProductCreatedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductCreatedMessagePayload>
- Returns:
- ProductCreatedMessagePayload
-
buildUnchecked
builds ProductCreatedMessagePayload without checking for non-null required values- Returns:
- ProductCreatedMessagePayload
-
of
factory method for an instance of ProductCreatedMessagePayloadBuilder- Returns:
- builder
-
of
create builder for ProductCreatedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-