Class VariantSkuSetMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.VariantSkuSetMessagePayloadBuilder
- All Implemented Interfaces:
Builder<VariantSkuSetMessagePayload>
public class VariantSkuSetMessagePayloadBuilder
extends Object
implements Builder<VariantSkuSetMessagePayload>
VariantSkuSetMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
VariantSkuSetMessagePayload variantSkuSetMessagePayload = VariantSkuSetMessagePayload.builder()
.product(productBuilder -> productBuilder)
.staged(true)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds VariantSkuSetMessagePayload with checking for non-null required valuesbuilds VariantSkuSetMessagePayload without checking for non-null required valuesThe previous SKU of the Variant.Reference to the Product containing the Variant.getSku()The SKU that was set on the Variant.Whether the update was only applied to the staged Variant.of()factory method for an instance of VariantSkuSetMessagePayloadBuilderof(VariantSkuSetMessagePayload template) create builder for VariantSkuSetMessagePayload instanceThe previous SKU of the Variant.product(ProductReference product) Reference to the Product containing the Variant.Reference to the Product containing the Variant.The SKU that was set on the Variant.Whether the update was only applied to the staged Variant.Reference to the Product containing the Variant.
-
Constructor Details
-
VariantSkuSetMessagePayloadBuilder
public VariantSkuSetMessagePayloadBuilder()
-
-
Method Details
-
product
public VariantSkuSetMessagePayloadBuilder product(Function<ProductReferenceBuilder, ProductReferenceBuilder> builder) Reference to the Product containing the Variant.
- Parameters:
builder- function to build the product value- Returns:
- Builder
-
withProduct
public VariantSkuSetMessagePayloadBuilder 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
-
sku
The SKU that was set on the Variant.
- Parameters:
sku- value to be set- Returns:
- Builder
-
oldSku
The previous SKU of the Variant.
- Parameters:
oldSku- value to be set- Returns:
- Builder
-
staged
Whether the update was only applied to the staged Variant.
- Parameters:
staged- value to be set- Returns:
- Builder
-
getProduct
Reference to the Product containing the Variant.
- Returns:
- product
-
getSku
The SKU that was set on the Variant.
- Returns:
- sku
-
getOldSku
The previous SKU of the Variant.
- Returns:
- oldSku
-
getStaged
Whether the update was only applied to the staged Variant.
- Returns:
- staged
-
build
builds VariantSkuSetMessagePayload with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantSkuSetMessagePayload>- Returns:
- VariantSkuSetMessagePayload
-
buildUnchecked
builds VariantSkuSetMessagePayload without checking for non-null required values- Returns:
- VariantSkuSetMessagePayload
-
of
factory method for an instance of VariantSkuSetMessagePayloadBuilder- Returns:
- builder
-
of
create builder for VariantSkuSetMessagePayload instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-