Class DateAttributeBuilder
java.lang.Object
com.commercetools.importapi.models.productvariants.DateAttributeBuilder
- All Implemented Interfaces:
Builder<DateAttribute>
DateAttributeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DateAttribute dateAttribute = DateAttribute.builder()
.value(LocalDate.parse("2022-01-01"))
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds DateAttribute with checking for non-null required valuesbuilds DateAttribute without checking for non-null required valuesgetName()Required if used for ProductVariantImport.getValue()A date in the formatYYYY-MM-DD.Required if used for ProductVariantImport.static DateAttributeBuilderof()factory method for an instance of DateAttributeBuilderstatic DateAttributeBuilderof(DateAttribute template) create builder for DateAttribute instanceA date in the formatYYYY-MM-DD.
-
Constructor Details
-
DateAttributeBuilder
public DateAttributeBuilder()
-
-
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
A date in the format
YYYY-MM-DD.- 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
A date in the format
YYYY-MM-DD.- Returns:
- value
-
build
builds DateAttribute with checking for non-null required values- Specified by:
buildin interfaceBuilder<DateAttribute>- Returns:
- DateAttribute
-
buildUnchecked
builds DateAttribute without checking for non-null required values- Returns:
- DateAttribute
-
of
factory method for an instance of DateAttributeBuilder- Returns:
- builder
-
of
create builder for DateAttribute instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-