Class ProductSelectionDraftBuilder
java.lang.Object
com.commercetools.api.models.product_selection.ProductSelectionDraftBuilder
- All Implemented Interfaces:
Builder<ProductSelectionDraft>
ProductSelectionDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductSelectionDraft productSelectionDraft = ProductSelectionDraft.builder()
.name(nameBuilder -> nameBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductSelectionDraft with checking for non-null required valuesbuilds ProductSelectionDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields of this ProductSelection.Custom Fields of this ProductSelection.Custom Fields of this ProductSelection.getKey()
User-defined unique identifier for the ProductSelection.getMode()
Mode of the Product Selection.getName()
Name of the ProductSelection.User-defined unique identifier for the ProductSelection.mode
(ProductSelectionMode mode) Mode of the Product Selection.name
(LocalizedString name) Name of the ProductSelection.Name of the ProductSelection.static ProductSelectionDraftBuilder
of()
factory method for an instance of ProductSelectionDraftBuilderstatic ProductSelectionDraftBuilder
of
(ProductSelectionDraft template) create builder for ProductSelectionDraft instanceCustom Fields of this ProductSelection.Name of the ProductSelection.
-
Constructor Details
-
ProductSelectionDraftBuilder
public ProductSelectionDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the ProductSelection.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
public ProductSelectionDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the ProductSelection. Not checked for uniqueness, but distinct names are recommended.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public ProductSelectionDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the ProductSelection. Not checked for uniqueness, but distinct names are recommended.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the ProductSelection. Not checked for uniqueness, but distinct names are recommended.
- Parameters:
name
- value to be set- Returns:
- Builder
-
custom
public ProductSelectionDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields of this ProductSelection.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public ProductSelectionDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields of this ProductSelection.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of this ProductSelection.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
mode
Mode of the Product Selection.
- Parameters:
mode
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the ProductSelection.
- Returns:
- key
-
getName
Name of the ProductSelection. Not checked for uniqueness, but distinct names are recommended.
- Returns:
- name
-
getCustom
Custom Fields of this ProductSelection.
- Returns:
- custom
-
getMode
Mode of the Product Selection.
- Returns:
- mode
-
build
builds ProductSelectionDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSelectionDraft>
- Returns:
- ProductSelectionDraft
-
buildUnchecked
builds ProductSelectionDraft without checking for non-null required values- Returns:
- ProductSelectionDraft
-
of
factory method for an instance of ProductSelectionDraftBuilder- Returns:
- builder
-
of
create builder for ProductSelectionDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-