Class ProductVariantAddedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.ProductVariantAddedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<ProductVariantAddedMessagePayload>
public class ProductVariantAddedMessagePayloadBuilder
extends Object
implements Builder<ProductVariantAddedMessagePayload>
ProductVariantAddedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductVariantAddedMessagePayload productVariantAddedMessagePayload = ProductVariantAddedMessagePayload.builder()
.variant(variantBuilder -> variantBuilder)
.staged(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductVariantAddedMessagePayload with checking for non-null required valuesbuilds ProductVariantAddedMessagePayload without checking for non-null required valuesWhether the update was only applied to the staged Product Projection.Unique identifier of the Product Variant that was added.of()
factory method for an instance of ProductVariantAddedMessagePayloadBuilderof
(ProductVariantAddedMessagePayload template) create builder for ProductVariantAddedMessagePayload instanceWhether the update was only applied to the staged Product Projection.variant
(ProductVariant variant) Unique identifier of the Product Variant that was added.Unique identifier of the Product Variant that was added.Unique identifier of the Product Variant that was added.
-
Constructor Details
-
ProductVariantAddedMessagePayloadBuilder
public ProductVariantAddedMessagePayloadBuilder()
-
-
Method Details
-
variant
public ProductVariantAddedMessagePayloadBuilder variant(Function<ProductVariantBuilder, ProductVariantBuilder> builder) Unique identifier of the Product Variant that was added.
- Parameters:
builder
- function to build the variant value- Returns:
- Builder
-
withVariant
public ProductVariantAddedMessagePayloadBuilder withVariant(Function<ProductVariantBuilder, ProductVariant> builder) Unique identifier of the Product Variant that was added.
- Parameters:
builder
- function to build the variant value- Returns:
- Builder
-
variant
Unique identifier of the Product Variant that was added.
- Parameters:
variant
- 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
-
getVariant
Unique identifier of the Product Variant that was added.
- Returns:
- variant
-
getStaged
Whether the update was only applied to the staged Product Projection.
- Returns:
- staged
-
build
builds ProductVariantAddedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductVariantAddedMessagePayload>
- Returns:
- ProductVariantAddedMessagePayload
-
buildUnchecked
builds ProductVariantAddedMessagePayload without checking for non-null required values- Returns:
- ProductVariantAddedMessagePayload
-
of
factory method for an instance of ProductVariantAddedMessagePayloadBuilder- Returns:
- builder
-
of
public static ProductVariantAddedMessagePayloadBuilder of(ProductVariantAddedMessagePayload template) create builder for ProductVariantAddedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-