Interface VariantCreatedMessagePayload
- All Superinterfaces:
MessagePayload,MessagePayloadMixin
Generated after a successful Create Variant request.
Example to create an instance using the builder pattern
VariantCreatedMessagePayload variantCreatedMessagePayload = VariantCreatedMessagePayload.builder()
.id("{id}")
.productId("{productId}")
.variantId(1)
.publish(true)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for VariantCreatedMessagePayload -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for VariantCreatedMessagePayloadbuilder(VariantCreatedMessagePayload template) create builder for VariantCreatedMessagePayload instancecopyDeep()static VariantCreatedMessagePayloaddeepCopy(VariantCreatedMessagePayload template) factory method to create a deep copy of VariantCreatedMessagePayloadAssets of the Variant.Attributes of the Variant.@NotNull StringgetId()Unique identifier of the Variant.Images of the Variant.getKey()User-defined unique identifier of the Variant.@NotNull StringUnique identifier of the Product to which the Variant belongs.@NotNull BooleanWhether the Variant was published.getSku()SKU of the Variant.@NotNull IntegerUnique identifier of the Variant within its parent Product.static VariantCreatedMessagePayloadof()factory methodstatic VariantCreatedMessagePayloadof(VariantCreatedMessagePayload template) factory method to create a shallow copy VariantCreatedMessagePayloadvoidAssets of the Variant.voidAssets of the Variant.voidsetAttributes(Attribute... attributes) Attributes of the Variant.voidsetAttributes(List<Attribute> attributes) Attributes of the Variant.voidUnique identifier of the Variant.voidImages of the Variant.voidImages of the Variant.voidUser-defined unique identifier of the Variant.voidsetProductId(String productId) Unique identifier of the Product to which the Variant belongs.voidsetPublish(Boolean publish) Whether the Variant was published.voidSKU of the Variant.voidsetVariantId(Integer variantId) Unique identifier of the Variant within its parent Product.static tools.jackson.core.type.TypeReference<VariantCreatedMessagePayload>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.message.MessagePayload
getType, withMessagePayloadMethods inherited from interface com.commercetools.api.models.message.MessagePayloadMixin
as
-
Field Details
-
VARIANT_CREATED
discriminator value for VariantCreatedMessagePayload- See Also:
-
-
Method Details
-
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
String getKey()User-defined unique identifier of the Variant.
- Returns:
- key
-
getSku
String 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
-
setId
Unique identifier of the Variant.
- Parameters:
id- value to be set
-
setProductId
Unique identifier of the Product to which the Variant belongs.
- Parameters:
productId- value to be set
-
setVariantId
Unique identifier of the Variant within its parent Product.
- Parameters:
variantId- value to be set
-
setKey
User-defined unique identifier of the Variant.
- Parameters:
key- value to be set
-
setSku
SKU of the Variant.
- Parameters:
sku- value to be set
-
setAttributes
Attributes of the Variant.
- Parameters:
attributes- values to be set
-
setAttributes
Attributes of the Variant.
- Parameters:
attributes- values to be set
-
setAssets
Assets of the Variant.
- Parameters:
assets- values to be set
-
setAssets
Assets of the Variant.
- Parameters:
assets- values to be set
-
setImages
Images of the Variant.
- Parameters:
images- values to be set
-
setImages
Images of the Variant.
- Parameters:
images- values to be set
-
setPublish
Whether the Variant was published.
- Parameters:
publish- value to be set
-
of
factory method- Returns:
- instance of VariantCreatedMessagePayload
-
of
factory method to create a shallow copy VariantCreatedMessagePayload- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantCreatedMessagePayload copyDeep()- Specified by:
copyDeepin interfaceMessagePayload
-
deepCopy
@Nullable static VariantCreatedMessagePayload deepCopy(@Nullable VariantCreatedMessagePayload template) factory method to create a deep copy of VariantCreatedMessagePayload- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantCreatedMessagePayload- Returns:
- builder
-
builder
create builder for VariantCreatedMessagePayload instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantCreatedMessagePayload
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-