Class AttributeLocalizedEnumValueBuilder
java.lang.Object
com.commercetools.api.models.product_type.AttributeLocalizedEnumValueBuilder
- All Implemented Interfaces:
Builder<AttributeLocalizedEnumValue>
public class AttributeLocalizedEnumValueBuilder
extends Object
implements Builder<AttributeLocalizedEnumValue>
AttributeLocalizedEnumValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AttributeLocalizedEnumValue attributeLocalizedEnumValue = AttributeLocalizedEnumValue.builder()
.key("{key}")
.label(labelBuilder -> labelBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AttributeLocalizedEnumValue with checking for non-null required valuesbuilds AttributeLocalizedEnumValue without checking for non-null required valuesgetKey()
Key of the value used as a programmatic identifier, for example in facets & filters.getLabel()
Descriptive, localized label of the value.Key of the value used as a programmatic identifier, for example in facets & filters.label
(LocalizedString label) Descriptive, localized label of the value.Descriptive, localized label of the value.of()
factory method for an instance of AttributeLocalizedEnumValueBuilderof
(AttributeLocalizedEnumValue template) create builder for AttributeLocalizedEnumValue instanceDescriptive, localized label of the value.
-
Constructor Details
-
AttributeLocalizedEnumValueBuilder
public AttributeLocalizedEnumValueBuilder()
-
-
Method Details
-
key
Key of the value used as a programmatic identifier, for example in facets & filters.
- Parameters:
key
- value to be set- Returns:
- Builder
-
label
public AttributeLocalizedEnumValueBuilder label(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Descriptive, localized label of the value.
- Parameters:
builder
- function to build the label value- Returns:
- Builder
-
withLabel
public AttributeLocalizedEnumValueBuilder withLabel(Function<LocalizedStringBuilder, LocalizedString> builder) Descriptive, localized label of the value.
- Parameters:
builder
- function to build the label value- Returns:
- Builder
-
label
Descriptive, localized label of the value.
- Parameters:
label
- value to be set- Returns:
- Builder
-
getKey
Key of the value used as a programmatic identifier, for example in facets & filters.
- Returns:
- key
-
getLabel
Descriptive, localized label of the value.
- Returns:
- label
-
build
builds AttributeLocalizedEnumValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<AttributeLocalizedEnumValue>
- Returns:
- AttributeLocalizedEnumValue
-
buildUnchecked
builds AttributeLocalizedEnumValue without checking for non-null required values- Returns:
- AttributeLocalizedEnumValue
-
of
factory method for an instance of AttributeLocalizedEnumValueBuilder- Returns:
- builder
-
of
create builder for AttributeLocalizedEnumValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-