Class LocalizedEnumValueBuilder
java.lang.Object
com.commercetools.importapi.models.common.LocalizedEnumValueBuilder
- All Implemented Interfaces:
Builder<LocalizedEnumValue>
LocalizedEnumValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
LocalizedEnumValue localizedEnumValue = LocalizedEnumValue.builder()
.key("{key}")
.label(labelBuilder -> labelBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds LocalizedEnumValue with checking for non-null required valuesbuilds LocalizedEnumValue 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.static LocalizedEnumValueBuilder
of()
factory method for an instance of LocalizedEnumValueBuilderstatic LocalizedEnumValueBuilder
of
(LocalizedEnumValue template) create builder for LocalizedEnumValue 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
-
LocalizedEnumValueBuilder
public LocalizedEnumValueBuilder()
-
-
Method Details
-
key
set the value to the key- Parameters:
key
- value to be set- Returns:
- Builder
-
label
public LocalizedEnumValueBuilder 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 LocalizedEnumValueBuilder 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 LocalizedEnumValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<LocalizedEnumValue>
- Returns:
- LocalizedEnumValue
-
buildUnchecked
builds LocalizedEnumValue without checking for non-null required values- Returns:
- LocalizedEnumValue
-
of
factory method for an instance of LocalizedEnumValueBuilder- Returns:
- builder
-
of
create builder for LocalizedEnumValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-