Class VariantKeySetMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.VariantKeySetMessagePayloadBuilder
- All Implemented Interfaces:
Builder<VariantKeySetMessagePayload>
public class VariantKeySetMessagePayloadBuilder
extends Object
implements Builder<VariantKeySetMessagePayload>
VariantKeySetMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
VariantKeySetMessagePayload variantKeySetMessagePayload = VariantKeySetMessagePayload.builder()
.product(productBuilder -> productBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds VariantKeySetMessagePayload with checking for non-null required valuesbuilds VariantKeySetMessagePayload without checking for non-null required valuesgetKey()The key that was set on the Variant.The previous key of the Variant.Reference to the Product containing the Variant.The key that was set on the Variant.of()factory method for an instance of VariantKeySetMessagePayloadBuilderof(VariantKeySetMessagePayload template) create builder for VariantKeySetMessagePayload instanceThe previous key of the Variant.product(ProductReference product) Reference to the Product containing the Variant.Reference to the Product containing the Variant.Reference to the Product containing the Variant.
-
Constructor Details
-
VariantKeySetMessagePayloadBuilder
public VariantKeySetMessagePayloadBuilder()
-
-
Method Details
-
product
public VariantKeySetMessagePayloadBuilder product(Function<ProductReferenceBuilder, ProductReferenceBuilder> builder) Reference to the Product containing the Variant.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
withProduct
public VariantKeySetMessagePayloadBuilder withProduct(Function<ProductReferenceBuilder, ProductReference> builder) Reference to the Product containing the Variant.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
product
Reference to the Product containing the Variant.
- Parameters:
product- value to be set- Returns:
- Builder
-
key
The key that was set on the Variant.
- Parameters:
key- value to be set- Returns:
- Builder
-
oldKey
The previous key of the Variant.
- Parameters:
oldKey- value to be set- Returns:
- Builder
-
getProduct
Reference to the Product containing the Variant.
- Returns:
- product
-
getKey
The key that was set on the Variant.
- Returns:
- key
-
getOldKey
The previous key of the Variant.
- Returns:
- oldKey
-
build
builds VariantKeySetMessagePayload with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantKeySetMessagePayload>- Returns:
- VariantKeySetMessagePayload
-
buildUnchecked
builds VariantKeySetMessagePayload without checking for non-null required values- Returns:
- VariantKeySetMessagePayload
-
of
factory method for an instance of VariantKeySetMessagePayloadBuilder- Returns:
- builder
-
of
create builder for VariantKeySetMessagePayload instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-