Class AttributeLocalizedEnumValueBuilder
java.lang.Object
com.commercetools.importapi.models.producttypes.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds AttributeLocalizedEnumValue with checking for non-null required valuesbuilds AttributeLocalizedEnumValue without checking for non-null required valuesgetKey()value of key}getLabel()A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.set the value to the keylabel(LocalizedString label) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.of()factory method for an instance of AttributeLocalizedEnumValueBuilderof(AttributeLocalizedEnumValue template) create builder for AttributeLocalizedEnumValue instanceA localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
-
Constructor Details
-
AttributeLocalizedEnumValueBuilder
public AttributeLocalizedEnumValueBuilder()
-
-
Method Details
-
key
set the value to the key- Parameters:
key- value to be set- Returns:
- Builder
-
label
public AttributeLocalizedEnumValueBuilder label(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }- Parameters:
builder- function to build the label value- Returns:
- Builder
-
withLabel
public AttributeLocalizedEnumValueBuilder withLabel(Function<LocalizedStringBuilder, LocalizedString> builder) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }- Parameters:
builder- function to build the label value- Returns:
- Builder
-
label
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }- Parameters:
label- value to be set- Returns:
- Builder
-
getKey
value of key}- Returns:
- key
-
getLabel
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }- Returns:
- label
-
build
builds AttributeLocalizedEnumValue with checking for non-null required values- Specified by:
buildin 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
-