Class EnumAttributeBuilder
java.lang.Object
com.commercetools.importapi.models.productvariants.EnumAttributeBuilder
- All Implemented Interfaces:
Builder<EnumAttribute>
EnumAttributeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
EnumAttribute enumAttribute = EnumAttribute.builder()
.value("{value}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds EnumAttribute with checking for non-null required valuesbuilds EnumAttribute without checking for non-null required valuesgetName()Required if used for ProductVariantImport.getValue()The key of the enum value.Required if used for ProductVariantImport.static EnumAttributeBuilderof()factory method for an instance of EnumAttributeBuilderstatic EnumAttributeBuilderof(EnumAttribute template) create builder for EnumAttribute instanceThe key of the enum value.
-
Constructor Details
-
EnumAttributeBuilder
public EnumAttributeBuilder()
-
-
Method Details
-
name
Required if used for ProductVariantImport. Must not be set if used for ProductVariantPatch.
Must match
nameof an AttributeDefinition of the Product Type.- Parameters:
name- value to be set- Returns:
- Builder
-
value
The key of the enum value. Must match the key of an AttributePlainEnumValue in the Product Type.
- Parameters:
value- value to be set- Returns:
- Builder
-
getName
Required if used for ProductVariantImport. Must not be set if used for ProductVariantPatch.
Must match
nameof an AttributeDefinition of the Product Type.- Returns:
- name
-
getValue
The key of the enum value. Must match the key of an AttributePlainEnumValue in the Product Type.
- Returns:
- value
-
build
builds EnumAttribute with checking for non-null required values- Specified by:
buildin interfaceBuilder<EnumAttribute>- Returns:
- EnumAttribute
-
buildUnchecked
builds EnumAttribute without checking for non-null required values- Returns:
- EnumAttribute
-
of
factory method for an instance of EnumAttributeBuilder- Returns:
- builder
-
of
create builder for EnumAttribute instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-