Class StoreCreatedMessageBuilder
- All Implemented Interfaces:
Builder<StoreCreatedMessage>
Example to create an instance using the builder pattern
StoreCreatedMessage storeCreatedMessage = StoreCreatedMessage.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)
.plusDistributionChannels(distributionChannelsBuilder -> distributionChannelsBuilder)
.plusSupplyChannels(supplyChannelsBuilder -> supplyChannelsBuilder)
.plusProductSelections(productSelectionsBuilder -> productSelectionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCountries
(Function<StoreCountryBuilder, StoreCountry> builder) Countries of the Store that was created.Distribution Channels of the Store that was created.ProductSelectionSettings of the Store that was created.Supply Channels of the Store that was created.build()
builds StoreCreatedMessage with checking for non-null required valuesbuilds StoreCreatedMessage without checking for non-null required valuescountries
(StoreCountry... countries) Countries of the Store that was created.countries
(List<StoreCountry> countries) Countries of the Store that was created.createdAt
(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.custom
(CustomFields custom) Custom Fields on the Store that was created.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields on the Store that was created.distributionChannels
(ChannelReference... distributionChannels) Distribution Channels of the Store that was created.distributionChannels
(List<ChannelReference> distributionChannels) Distribution Channels of the Store that was created.Countries of the Store that was created.Date and time (UTC) the Message was generated.IDs and references that created the Message.Custom Fields on the Store that was created.Distribution Channels of the Store that was created.getId()
Unique identifier of the Message.Languages of the Store that was created.Value ofcreatedAt
.IDs and references that last modified the Message.getName()
Thename
of the Store that was created.ProductSelectionSettings of the Store that was created.Reference to the resource on which the change or action was performed.User-provided identifiers of the resource, such askey
orexternalId
.Version of the resource on which the change or action was performed.Message number in relation to other Messages for a given resource.Supply Channels of the Store that was created.Version of a resource.Unique identifier of the Message.Languages of the Store that was created.Languages of the Store that was created.lastModifiedAt
(ZonedDateTime lastModifiedAt) Value ofcreatedAt
.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Message.IDs and references that last modified the Message.name
(LocalizedString name) Thename
of the Store that was created.Thename
of the Store that was created.static StoreCreatedMessageBuilder
of()
factory method for an instance of StoreCreatedMessageBuilderstatic StoreCreatedMessageBuilder
of
(StoreCreatedMessage template) create builder for StoreCreatedMessage instanceplusCountries
(StoreCountry... countries) Countries of the Store that was created.Countries of the Store that was created.plusDistributionChannels
(ChannelReference... distributionChannels) Distribution Channels of the Store that was created.Distribution Channels of the Store that was created.plusLanguages
(String... languages) Languages of the Store that was created.plusProductSelections
(ProductSelectionSetting... productSelections) ProductSelectionSettings of the Store that was created.plusProductSelections
(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) ProductSelectionSettings of the Store that was created.plusSupplyChannels
(ChannelReference... supplyChannels) Supply Channels of the Store that was created.Supply Channels of the Store that was created.productSelections
(ProductSelectionSetting... productSelections) ProductSelectionSettings of the Store that was created.productSelections
(List<ProductSelectionSetting> productSelections) ProductSelectionSettings of the Store that was created.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 askey
orexternalId
.resourceUserProvidedIdentifiers
(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiersBuilder> builder) User-provided identifiers of the resource, such askey
orexternalId
.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.setCountries
(Function<StoreCountryBuilder, StoreCountry> builder) Countries of the Store that was created.Distribution Channels of the Store that was created.ProductSelectionSettings of the Store that was created.Supply Channels of the Store that was created.supplyChannels
(ChannelReference... supplyChannels) Supply Channels of the Store that was created.supplyChannels
(List<ChannelReference> supplyChannels) Supply Channels of the Store that was created.Version of a resource.Countries of the Store that was created.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Message.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields on the Store that was created.Distribution Channels of the Store that was created.IDs and references that last modified the Message.Thename
of the Store that was created.withProductSelections
(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) ProductSelectionSettings of the Store that was created.withResourceUserProvidedIdentifiers
(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiers> builder) User-provided identifiers of the resource, such askey
orexternalId
.Supply Channels of the Store that was created.
-
Constructor Details
-
StoreCreatedMessageBuilder
public StoreCreatedMessageBuilder()
-
-
Method Details
-
id
Unique identifier of the Message. Can be used to track which Messages have been processed.
- 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 StoreCreatedMessageBuilder 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 StoreCreatedMessageBuilder 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
sequenceNumber
of the next Message for the resource is the successor of thesequenceNumber
of the current Message. Meaning, thesequenceNumber
of the next Message equals thesequenceNumber
of the current Message + 1.sequenceNumber
can 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 StoreCreatedMessageBuilder 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 StoreCreatedMessageBuilder resourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiersBuilder> builder) User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Parameters:
builder
- function to build the resourceUserProvidedIdentifiers value- Returns:
- Builder
-
withResourceUserProvidedIdentifiers
public StoreCreatedMessageBuilder withResourceUserProvidedIdentifiers(Function<UserProvidedIdentifiersBuilder, UserProvidedIdentifiers> builder) User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Parameters:
builder
- function to build the resourceUserProvidedIdentifiers value- Returns:
- Builder
-
resourceUserProvidedIdentifiers
public StoreCreatedMessageBuilder resourceUserProvidedIdentifiers(@Nullable UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-provided identifiers of the resource, such as
key
orexternalId
. Only present if the resource has such identifiers.- Parameters:
resourceUserProvidedIdentifiers
- value to be set- Returns:
- Builder
-
name
public StoreCreatedMessageBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) The
name
of the Store that was created.- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public StoreCreatedMessageBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) The
name
of the Store that was created.- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
The
name
of the Store that was created.- Parameters:
name
- value to be set- Returns:
- Builder
-
languages
Languages of the Store that was created. Languages are represented as IETF language tags.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
languages
Languages of the Store that was created. Languages are represented as IETF language tags.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
plusLanguages
Languages of the Store that was created. Languages are represented as IETF language tags.
- Parameters:
languages
- value to be set- Returns:
- Builder
-
countries
Countries of the Store that was created.
- Parameters:
countries
- value to be set- Returns:
- Builder
-
countries
Countries of the Store that was created.
- Parameters:
countries
- value to be set- Returns:
- Builder
-
plusCountries
Countries of the Store that was created.
- Parameters:
countries
- value to be set- Returns:
- Builder
-
plusCountries
public StoreCreatedMessageBuilder plusCountries(Function<StoreCountryBuilder, StoreCountryBuilder> builder) Countries of the Store that was created.
- Parameters:
builder
- function to build the countries value- Returns:
- Builder
-
withCountries
public StoreCreatedMessageBuilder withCountries(Function<StoreCountryBuilder, StoreCountryBuilder> builder) Countries of the Store that was created.
- Parameters:
builder
- function to build the countries value- Returns:
- Builder
-
addCountries
Countries of the Store that was created.
- Parameters:
builder
- function to build the countries value- Returns:
- Builder
-
setCountries
Countries of the Store that was created.
- Parameters:
builder
- function to build the countries value- Returns:
- Builder
-
distributionChannels
Distribution Channels of the Store that was created.
- Parameters:
distributionChannels
- value to be set- Returns:
- Builder
-
distributionChannels
Distribution Channels of the Store that was created.
- Parameters:
distributionChannels
- value to be set- Returns:
- Builder
-
plusDistributionChannels
public StoreCreatedMessageBuilder plusDistributionChannels(ChannelReference... distributionChannels) Distribution Channels of the Store that was created.
- Parameters:
distributionChannels
- value to be set- Returns:
- Builder
-
plusDistributionChannels
public StoreCreatedMessageBuilder plusDistributionChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Distribution Channels of the Store that was created.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
withDistributionChannels
public StoreCreatedMessageBuilder withDistributionChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Distribution Channels of the Store that was created.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
addDistributionChannels
public StoreCreatedMessageBuilder addDistributionChannels(Function<ChannelReferenceBuilder, ChannelReference> builder) Distribution Channels of the Store that was created.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
setDistributionChannels
public StoreCreatedMessageBuilder setDistributionChannels(Function<ChannelReferenceBuilder, ChannelReference> builder) Distribution Channels of the Store that was created.
- Parameters:
builder
- function to build the distributionChannels value- Returns:
- Builder
-
supplyChannels
Supply Channels of the Store that was created.
- Parameters:
supplyChannels
- value to be set- Returns:
- Builder
-
supplyChannels
Supply Channels of the Store that was created.
- Parameters:
supplyChannels
- value to be set- Returns:
- Builder
-
plusSupplyChannels
Supply Channels of the Store that was created.
- Parameters:
supplyChannels
- value to be set- Returns:
- Builder
-
plusSupplyChannels
public StoreCreatedMessageBuilder plusSupplyChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Supply Channels of the Store that was created.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
withSupplyChannels
public StoreCreatedMessageBuilder withSupplyChannels(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Supply Channels of the Store that was created.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
addSupplyChannels
public StoreCreatedMessageBuilder addSupplyChannels(Function<ChannelReferenceBuilder, ChannelReference> builder) Supply Channels of the Store that was created.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
setSupplyChannels
public StoreCreatedMessageBuilder setSupplyChannels(Function<ChannelReferenceBuilder, ChannelReference> builder) Supply Channels of the Store that was created.
- Parameters:
builder
- function to build the supplyChannels value- Returns:
- Builder
-
productSelections
ProductSelectionSettings of the Store that was created.
- Parameters:
productSelections
- value to be set- Returns:
- Builder
-
productSelections
public StoreCreatedMessageBuilder productSelections(List<ProductSelectionSetting> productSelections) ProductSelectionSettings of the Store that was created.
- Parameters:
productSelections
- value to be set- Returns:
- Builder
-
plusProductSelections
public StoreCreatedMessageBuilder plusProductSelections(ProductSelectionSetting... productSelections) ProductSelectionSettings of the Store that was created.
- Parameters:
productSelections
- value to be set- Returns:
- Builder
-
plusProductSelections
public StoreCreatedMessageBuilder plusProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) ProductSelectionSettings of the Store that was created.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
withProductSelections
public StoreCreatedMessageBuilder withProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSettingBuilder> builder) ProductSelectionSettings of the Store that was created.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
addProductSelections
public StoreCreatedMessageBuilder addProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSetting> builder) ProductSelectionSettings of the Store that was created.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
setProductSelections
public StoreCreatedMessageBuilder setProductSelections(Function<ProductSelectionSettingBuilder, ProductSelectionSetting> builder) ProductSelectionSettings of the Store that was created.
- Parameters:
builder
- function to build the productSelections value- Returns:
- Builder
-
custom
Custom Fields on the Store that was created.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields on the Store that was created.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields on the Store that was created.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Message. Can be used to track which Messages have been processed.
- 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
sequenceNumber
of the next Message for the resource is the successor of thesequenceNumber
of the current Message. Meaning, thesequenceNumber
of the next Message equals thesequenceNumber
of the current Message + 1.sequenceNumber
can 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
key
orexternalId
. Only present if the resource has such identifiers.- Returns:
- resourceUserProvidedIdentifiers
-
getName
The
name
of the Store that was created.- Returns:
- name
-
getLanguages
Languages of the Store that was created. Languages are represented as IETF language tags.
- Returns:
- languages
-
getCountries
Countries of the Store that was created.
- Returns:
- countries
-
getDistributionChannels
Distribution Channels of the Store that was created.
- Returns:
- distributionChannels
-
getSupplyChannels
Supply Channels of the Store that was created.
- Returns:
- supplyChannels
-
getProductSelections
ProductSelectionSettings of the Store that was created.
- Returns:
- productSelections
-
getCustom
Custom Fields on the Store that was created.
- Returns:
- custom
-
build
builds StoreCreatedMessage with checking for non-null required values- Specified by:
build
in interfaceBuilder<StoreCreatedMessage>
- Returns:
- StoreCreatedMessage
-
buildUnchecked
builds StoreCreatedMessage without checking for non-null required values- Returns:
- StoreCreatedMessage
-
of
factory method for an instance of StoreCreatedMessageBuilder- Returns:
- builder
-
of
create builder for StoreCreatedMessage instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-