Interface VariantCreatedMessage
- All Superinterfaces:
BaseResource,DomainResource<Message>,Identifiable<Message>,Message,Versioned<Message>
Generated after a successful Create Variant request.
Example to create an instance using the builder pattern
VariantCreatedMessage variantCreatedMessage = VariantCreatedMessage.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.sequenceNumber(0.3)
.resource(resourceBuilder -> resourceBuilder)
.resourceVersion(0.3)
.productId("{productId}")
.variantId(1)
.publish(true)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for VariantCreatedMessage -
Method Summary
Modifier and TypeMethodDescriptionstatic VariantCreatedMessageBuilderbuilder()builder factory method for VariantCreatedMessagestatic VariantCreatedMessageBuilderbuilder(VariantCreatedMessage template) create builder for VariantCreatedMessage instancecopyDeep()static VariantCreatedMessagedeepCopy(VariantCreatedMessage template) factory method to create a deep copy of VariantCreatedMessageAssets 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 VariantCreatedMessageof()factory methodstatic VariantCreatedMessageof(VariantCreatedMessage template) factory method to create a shallow copy VariantCreatedMessagevoidAssets 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<VariantCreatedMessage>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.message.Message
getCreatedAt, getCreatedBy, getLastModifiedAt, getLastModifiedBy, getResource, getResourceUserProvidedIdentifiers, getResourceVersion, getSequenceNumber, getType, getVersion, setCreatedAt, setCreatedBy, setLastModifiedAt, setLastModifiedBy, setResource, setResourceUserProvidedIdentifiers, setResourceVersion, setSequenceNumber, setVersion, withMessage
-
Field Details
-
VARIANT_CREATED
discriminator value for VariantCreatedMessage- See Also:
-
-
Method Details
-
getId
Unique identifier of the Variant.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Message>- Specified by:
getIdin interfaceIdentifiable<Message>- Specified by:
getIdin interfaceMessage- Specified by:
getIdin interfaceVersioned<Message>- 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.
- Specified by:
setIdin interfaceBaseResource- Specified by:
setIdin interfaceMessage- 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 VariantCreatedMessage
-
of
factory method to create a shallow copy VariantCreatedMessage- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantCreatedMessage copyDeep()- Specified by:
copyDeepin interfaceBaseResource- Specified by:
copyDeepin interfaceMessage
-
deepCopy
factory method to create a deep copy of VariantCreatedMessage- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantCreatedMessage- Returns:
- builder
-
builder
create builder for VariantCreatedMessage instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantCreatedMessage
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
-