Class ProductSelectionBuilder
- All Implemented Interfaces:
Builder<ProductSelection>
Example to create an instance using the builder pattern
ProductSelection productSelection = ProductSelection.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name(nameBuilder -> nameBuilder)
.productCount(0.3)
.mode(ProductSelectionMode.INDIVIDUAL)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSelection with checking for non-null required valuesbuilds ProductSelection without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ProductSelection was initially created.Present on resources created after 1/02/2019 except for events not tracked.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) Present on resources created after 1/02/2019 except for events not tracked.custom
(CustomFields custom) Custom Fields of the ProductSelection.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the ProductSelection.Date and time (UTC) the ProductSelection was initially created.Present on resources created after 1/02/2019 except for events not tracked.Custom Fields of the ProductSelection.getId()
Unique identifier of the ProductSelection.getKey()
User-defined unique identifier of the ProductSelection.Date and time (UTC) the ProductSelection was last updated.Present on resources updated after 1/02/2019 except for events not tracked.getMode()
Specifies in which way the Products are assigned to the ProductSelection.getName()
Name of the ProductSelection.Number of Products that are currently assigned to this ProductSelection.Current version of the ProductSelection.Unique identifier of the ProductSelection.User-defined unique identifier of the ProductSelection.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ProductSelection was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources updated after 1/02/2019 except for events not tracked.Present on resources updated after 1/02/2019 except for events not tracked.mode
(ProductSelectionMode mode) Specifies in which way the Products are assigned to the ProductSelection.name
(LocalizedString name) Name of the ProductSelection.Name of the ProductSelection.static ProductSelectionBuilder
of()
factory method for an instance of ProductSelectionBuilderstatic ProductSelectionBuilder
of
(ProductSelection template) create builder for ProductSelection instanceproductCount
(Integer productCount) Number of Products that are currently assigned to this ProductSelection.Current version of the ProductSelection.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) Present on resources created after 1/02/2019 except for events not tracked.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the ProductSelection.Present on resources updated after 1/02/2019 except for events not tracked.Name of the ProductSelection.
-
Constructor Details
-
ProductSelectionBuilder
public ProductSelectionBuilder()
-
-
Method Details
-
id
Unique identifier of the ProductSelection.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the ProductSelection.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the ProductSelection was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the ProductSelection was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public ProductSelectionBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) Present on resources updated after 1/02/2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public ProductSelectionBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) Present on resources updated after 1/02/2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
Present on resources updated after 1/02/2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
Present on resources created after 1/02/2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
Present on resources created after 1/02/2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
Present on resources created after 1/02/2019 except for events not tracked.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the ProductSelection.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
public ProductSelectionBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the ProductSelection.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the ProductSelection.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the ProductSelection.
- Parameters:
name
- value to be set- Returns:
- Builder
-
productCount
Number of Products that are currently assigned to this ProductSelection.
- Parameters:
productCount
- value to be set- Returns:
- Builder
-
mode
Specifies in which way the Products are assigned to the ProductSelection. Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- Parameters:
mode
- value to be set- Returns:
- Builder
-
custom
Custom Fields of the ProductSelection.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the ProductSelection.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the ProductSelection.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the ProductSelection.
- Returns:
- id
-
getVersion
Current version of the ProductSelection.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ProductSelection was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ProductSelection was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources updated after 1/02/2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1/02/2019 except for events not tracked.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the ProductSelection.
- Returns:
- key
-
getName
Name of the ProductSelection.
- Returns:
- name
-
getProductCount
Number of Products that are currently assigned to this ProductSelection.
- Returns:
- productCount
-
getMode
Specifies in which way the Products are assigned to the ProductSelection. Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- Returns:
- mode
-
getCustom
Custom Fields of the ProductSelection.
- Returns:
- custom
-
build
builds ProductSelection with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelection>
- Returns:
- ProductSelection
-
buildUnchecked
builds ProductSelection without checking for non-null required values- Returns:
- ProductSelection
-
of
factory method for an instance of ProductSelectionBuilder- Returns:
- builder
-
of
create builder for ProductSelection instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-