Class VariantCreatedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<VariantCreatedMessagePayload>
Example to create an instance using the builder pattern
VariantCreatedMessagePayload variantCreatedMessagePayload = VariantCreatedMessagePayload.builder()
.id("{id}")
.productId("{productId}")
.variantId(1)
.publish(true)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssets(Function<AssetBuilder, Asset> builder) Assets of the Variant.addAttributes(Function<AttributeBuilder, Attribute> builder) Attributes of the Variant.addImages(Function<ImageBuilder, Image> builder) Images of the Variant.Assets of the Variant.Assets of the Variant.attributes(Attribute... attributes) Attributes of the Variant.attributes(List<Attribute> attributes) Attributes of the Variant.build()builds VariantCreatedMessagePayload with checking for non-null required valuesbuilds VariantCreatedMessagePayload without checking for non-null required valuesAssets of the Variant.Attributes of the Variant.getId()Unique identifier of the Variant.Images of the Variant.getKey()User-defined unique identifier of the Variant.Unique identifier of the Product to which the Variant belongs.Whether the Variant was published.getSku()SKU of the Variant.Unique identifier of the Variant within its parent Product.Unique identifier of the Variant.Images of the Variant.Images of the Variant.User-defined unique identifier of the Variant.of()factory method for an instance of VariantCreatedMessagePayloadBuilderof(VariantCreatedMessagePayload template) create builder for VariantCreatedMessagePayload instanceplusAssets(Asset... assets) Assets of the Variant.plusAssets(Function<AssetBuilder, AssetBuilder> builder) Assets of the Variant.plusAttributes(Attribute... attributes) Attributes of the Variant.Attributes of the Variant.plusImages(Image... images) Images of the Variant.plusImages(Function<ImageBuilder, ImageBuilder> builder) Images of the Variant.Unique identifier of the Product to which the Variant belongs.Whether the Variant was published.setAssets(Function<AssetBuilder, Asset> builder) Assets of the Variant.setAttributes(Function<AttributeBuilder, Attribute> builder) Attributes of the Variant.setImages(Function<ImageBuilder, Image> builder) Images of the Variant.SKU of the Variant.Unique identifier of the Variant within its parent Product.withAssets(Function<AssetBuilder, AssetBuilder> builder) Assets of the Variant.Attributes of the Variant.withImages(Function<ImageBuilder, ImageBuilder> builder) Images of the Variant.
-
Constructor Details
-
VariantCreatedMessagePayloadBuilder
public VariantCreatedMessagePayloadBuilder()
-
-
Method Details
-
id
Unique identifier of the Variant.
- Parameters:
id- value to be set- Returns:
- Builder
-
productId
Unique identifier of the Product to which the Variant belongs.
- Parameters:
productId- value to be set- Returns:
- Builder
-
variantId
Unique identifier of the Variant within its parent Product.
- Parameters:
variantId- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Variant.
- Parameters:
key- value to be set- Returns:
- Builder
-
sku
SKU of the Variant.
- Parameters:
sku- value to be set- Returns:
- Builder
-
attributes
Attributes of the Variant.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
attributes
Attributes of the Variant.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
Attributes of the Variant.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
public VariantCreatedMessagePayloadBuilder plusAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
withAttributes
public VariantCreatedMessagePayloadBuilder withAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
addAttributes
public VariantCreatedMessagePayloadBuilder addAttributes(Function<AttributeBuilder, Attribute> builder) Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
setAttributes
public VariantCreatedMessagePayloadBuilder setAttributes(Function<AttributeBuilder, Attribute> builder) Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
assets
Assets of the Variant.
- Parameters:
assets- value to be set- Returns:
- Builder
-
assets
Assets of the Variant.
- Parameters:
assets- value to be set- Returns:
- Builder
-
plusAssets
Assets of the Variant.
- Parameters:
assets- value to be set- Returns:
- Builder
-
plusAssets
Assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
withAssets
Assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
addAssets
Assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
setAssets
Assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
images
Images of the Variant.
- Parameters:
images- value to be set- Returns:
- Builder
-
images
Images of the Variant.
- Parameters:
images- value to be set- Returns:
- Builder
-
plusImages
Images of the Variant.
- Parameters:
images- value to be set- Returns:
- Builder
-
plusImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
withImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
addImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
setImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
publish
Whether the Variant was published.
- Parameters:
publish- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Variant.
- Returns:
- id
-
getProductId
Unique identifier of the Product to which the Variant belongs.
- Returns:
- productId
-
getVariantId
Unique identifier of the Variant within its parent Product.
- Returns:
- variantId
-
getKey
User-defined unique identifier of the Variant.
- Returns:
- key
-
getSku
SKU of the Variant.
- Returns:
- sku
-
getAttributes
Attributes of the Variant.
- Returns:
- attributes
-
getAssets
Assets of the Variant.
- Returns:
- assets
-
getImages
Images of the Variant.
- Returns:
- images
-
getPublish
Whether the Variant was published.
- Returns:
- publish
-
build
builds VariantCreatedMessagePayload with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantCreatedMessagePayload>- Returns:
- VariantCreatedMessagePayload
-
buildUnchecked
builds VariantCreatedMessagePayload without checking for non-null required values- Returns:
- VariantCreatedMessagePayload
-
of
factory method for an instance of VariantCreatedMessagePayloadBuilder- Returns:
- builder
-
of
create builder for VariantCreatedMessagePayload instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-