Class VariantCreatedMessageBuilder
- All Implemented Interfaces:
Builder<VariantCreatedMessage>
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()
-
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 VariantCreatedMessage with checking for non-null required valuesbuilds VariantCreatedMessage without checking for non-null required valuescreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Message was generated.IDs and references that created the Message.createdBy(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Message.Assets of the Variant.Attributes of the Variant.Date and time (UTC) the Message was generated.IDs and references that created the Message.getId()Unique identifier of the Variant.Images of the Variant.getKey()User-defined unique identifier of the Variant.Value ofcreatedAt.IDs and references that last modified the Message.Unique identifier of the Product to which the Variant belongs.Whether the Variant was published.Reference to the resource on which the change or action was performed.User-provided identifiers of the resource, such askeyorexternalId.Version of the resource on which the change or action was performed.Message number in relation to other Messages for a given resource.getSku()SKU of the Variant.Unique identifier of the Variant within its parent Product.Version of a resource.Unique identifier of the Variant.Images of the Variant.Images of the Variant.User-defined unique identifier of the Variant.lastModifiedAt(ZonedDateTime lastModifiedAt) Value ofcreatedAt.lastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Message.IDs and references that last modified the Message.static VariantCreatedMessageBuilderof()factory method for an instance of VariantCreatedMessageBuilderstatic VariantCreatedMessageBuilderof(VariantCreatedMessage template) create builder for VariantCreatedMessage 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.Reference to the resource on which the change or action was performed.resource(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource on which the change or action was performed.resourceUserProvidedIdentifiers(UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-provided identifiers of the resource, such askeyorexternalId.resourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiersBuilder> builder) User-provided identifiers of the resource, such askeyorexternalId.resourceVersion(Long resourceVersion) Version of the resource on which the change or action was performed.sequenceNumber(Long sequenceNumber) Message number in relation to other Messages for a given resource.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.Version of a resource.withAssets(Function<AssetBuilder, AssetBuilder> builder) Assets of the Variant.Attributes of the Variant.withCreatedBy(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Message.withImages(Function<ImageBuilder, ImageBuilder> builder) Images of the Variant.IDs and references that last modified the Message.withResourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiers> builder) User-provided identifiers of the resource, such askeyorexternalId.
-
Constructor Details
-
VariantCreatedMessageBuilder
public VariantCreatedMessageBuilder()
-
-
Method Details
-
id
Unique identifier of the Variant.
- Parameters:
id- value to be set- Returns:
- Builder
-
version
Version of a resource. In case of Messages, this is always
1.- Parameters:
version- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Message was generated.
- Parameters:
createdAt- value to be set- Returns:
- Builder
-
lastModifiedAt
Value of
createdAt.- Parameters:
lastModifiedAt- value to be set- Returns:
- Builder
-
lastModifiedBy
public VariantCreatedMessageBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the Message.
- Parameters:
builder- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public VariantCreatedMessageBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the Message.
- Parameters:
builder- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Message.
- Parameters:
lastModifiedBy- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Message.
- Parameters:
builder- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Message.
- Parameters:
builder- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Message.
- Parameters:
createdBy- value to be set- Returns:
- Builder
-
sequenceNumber
Message number in relation to other Messages for a given resource. The
sequenceNumberof the next Message for the resource is the successor of thesequenceNumberof the current Message. Meaning, thesequenceNumberof the next Message equals thesequenceNumberof the current Message + 1.sequenceNumbercan be used to ensure that Messages are processed in the correct order for a particular resource.- Parameters:
sequenceNumber- value to be set- Returns:
- Builder
-
resource
Reference to the resource on which the change or action was performed.
- Parameters:
resource- value to be set- Returns:
- Builder
-
resource
public VariantCreatedMessageBuilder resource(Function<ReferenceBuilder, Builder<? extends Reference>> builder) Reference to the resource on which the change or action was performed.
- Parameters:
builder- function to build the resource value- Returns:
- Builder
-
resourceVersion
Version of the resource on which the change or action was performed.
- Parameters:
resourceVersion- value to be set- Returns:
- Builder
-
resourceUserProvidedIdentifiers
public VariantCreatedMessageBuilder resourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiersBuilder> builder) User-provided identifiers of the resource, such as
keyorexternalId. Only present if the resource has such identifiers.- Parameters:
builder- function to build the resourceUserProvidedIdentifiers value- Returns:
- Builder
-
withResourceUserProvidedIdentifiers
public VariantCreatedMessageBuilder withResourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiers> builder) User-provided identifiers of the resource, such as
keyorexternalId. Only present if the resource has such identifiers.- Parameters:
builder- function to build the resourceUserProvidedIdentifiers value- Returns:
- Builder
-
resourceUserProvidedIdentifiers
public VariantCreatedMessageBuilder resourceUserProvidedIdentifiers(@Nullable UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-provided identifiers of the resource, such as
keyorexternalId. Only present if the resource has such identifiers.- Parameters:
resourceUserProvidedIdentifiers- 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 VariantCreatedMessageBuilder plusAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
withAttributes
public VariantCreatedMessageBuilder withAttributes(Function<AttributeBuilder, AttributeBuilder> builder) Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
addAttributes
Attributes of the Variant.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
setAttributes
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
-
getVersion
Version of a resource. In case of Messages, this is always
1.- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Message was generated.
- Returns:
- createdAt
-
getLastModifiedAt
Value of
createdAt.- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Message.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Message.
- Returns:
- createdBy
-
getSequenceNumber
Message number in relation to other Messages for a given resource. The
sequenceNumberof the next Message for the resource is the successor of thesequenceNumberof the current Message. Meaning, thesequenceNumberof the next Message equals thesequenceNumberof the current Message + 1.sequenceNumbercan be used to ensure that Messages are processed in the correct order for a particular resource.- Returns:
- sequenceNumber
-
getResource
Reference to the resource on which the change or action was performed.
- Returns:
- resource
-
getResourceVersion
Version of the resource on which the change or action was performed.
- Returns:
- resourceVersion
-
getResourceUserProvidedIdentifiers
User-provided identifiers of the resource, such as
keyorexternalId. Only present if the resource has such identifiers.- Returns:
- resourceUserProvidedIdentifiers
-
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 VariantCreatedMessage with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantCreatedMessage>- Returns:
- VariantCreatedMessage
-
buildUnchecked
builds VariantCreatedMessage without checking for non-null required values- Returns:
- VariantCreatedMessage
-
of
factory method for an instance of VariantCreatedMessageBuilder- Returns:
- builder
-
of
create builder for VariantCreatedMessage instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-