Class DateTimeAttributeBuilder
java.lang.Object
com.commercetools.importapi.models.productvariants.DateTimeAttributeBuilder
- All Implemented Interfaces:
Builder<DateTimeAttribute>
DateTimeAttributeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DateTimeAttribute dateTimeAttribute = DateTimeAttribute.builder()
.value(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DateTimeAttribute with checking for non-null required valuesbuilds DateTimeAttribute without checking for non-null required valuesgetName()
Required if used for ProductVariantImport.getValue()
A date with time in the formatYYYY-MM-DDTHH:mm:ss.SSSZ
.Required if used for ProductVariantImport.static DateTimeAttributeBuilder
of()
factory method for an instance of DateTimeAttributeBuilderstatic DateTimeAttributeBuilder
of
(DateTimeAttribute template) create builder for DateTimeAttribute instancevalue
(ZonedDateTime value) A date with time in the formatYYYY-MM-DDTHH:mm:ss.SSSZ
.
-
Constructor Details
-
DateTimeAttributeBuilder
public DateTimeAttributeBuilder()
-
-
Method Details
-
name
Required if used for ProductVariantImport. Must not be set if used for ProductVariantPatch.
Must match
name
of an AttributeDefinition of the Product Type.- Parameters:
name
- value to be set- Returns:
- Builder
-
value
A date with time in the format
YYYY-MM-DDTHH:mm:ss.SSSZ
. The time zone is optional and defaults to UTC if not specified. If the time zone is specified, it must be in the format±HH:mm
orZ
for UTC.- Parameters:
value
- value to be set- Returns:
- Builder
-
getName
Required if used for ProductVariantImport. Must not be set if used for ProductVariantPatch.
Must match
name
of an AttributeDefinition of the Product Type.- Returns:
- name
-
getValue
A date with time in the format
YYYY-MM-DDTHH:mm:ss.SSSZ
. The time zone is optional and defaults to UTC if not specified. If the time zone is specified, it must be in the format±HH:mm
orZ
for UTC.- Returns:
- value
-
build
builds DateTimeAttribute with checking for non-null required values- Specified by:
build
in interfaceBuilder<DateTimeAttribute>
- Returns:
- DateTimeAttribute
-
buildUnchecked
builds DateTimeAttribute without checking for non-null required values- Returns:
- DateTimeAttribute
-
of
factory method for an instance of DateTimeAttributeBuilder- Returns:
- builder
-
of
create builder for DateTimeAttribute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-