Interface AttributeEnumType
- All Superinterfaces:
AttributeType
Attribute type for plain enum values. Useful for predefined language-agnostic values selectable in drop downs when only one value should be selected. Use AttributeSetType of AttributeEnumType instead if multiple values can be selected from the list.
Example to create an instance using the builder pattern
AttributeEnumType attributeEnumType = AttributeEnumType.builder()
.plusValues(valuesBuilder -> valuesBuilder)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeEnumTypeBuilderbuilder()builder factory method for AttributeEnumTypestatic AttributeEnumTypeBuilderbuilder(AttributeEnumType template) create builder for AttributeEnumType instancecopyDeep()static AttributeEnumTypedeepCopy(AttributeEnumType template) factory method to create a deep copy of AttributeEnumType@NotNull @Valid List<AttributePlainEnumValue>Available values that can be assigned to Products.static AttributeEnumTypeof()factory methodstatic AttributeEnumTypeof(AttributeEnumType template) factory method to create a shallow copy AttributeEnumTypevoidsetValues(AttributePlainEnumValue... values) Available values that can be assigned to Products.voidsetValues(List<AttributePlainEnumValue> values) Available values that can be assigned to Products.static com.fasterxml.jackson.core.type.TypeReference<AttributeEnumType>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithAttributeEnumType(Function<AttributeEnumType, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product_type.AttributeType
getName, withAttributeType
-
Field Details
-
ENUM
discriminator value for AttributeEnumType- See Also:
-
-
Method Details
-
getValues
Available values that can be assigned to Products.
- Returns:
- values
-
setValues
Available values that can be assigned to Products.
- Parameters:
values- values to be set
-
setValues
Available values that can be assigned to Products.
- Parameters:
values- values to be set
-
of
factory method- Returns:
- instance of AttributeEnumType
-
of
factory method to create a shallow copy AttributeEnumType- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
AttributeEnumType copyDeep()- Specified by:
copyDeepin interfaceAttributeType
-
deepCopy
factory method to create a deep copy of AttributeEnumType- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AttributeEnumType- Returns:
- builder
-
builder
create builder for AttributeEnumType instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withAttributeEnumType
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-