Interface DateTimeField
- All Superinterfaces:
CustomField
A field with a date time value.
Example to create an instance using the builder pattern
DateTimeField dateTimeField = DateTimeField.builder()
.value(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeFieldBuilder
builder()
builder factory method for DateTimeFieldstatic DateTimeFieldBuilder
builder
(DateTimeField template) create builder for DateTimeField instancecopyDeep()
static DateTimeField
deepCopy
(DateTimeField template) factory method to create a deep copy of DateTimeField@NotNull ZonedDateTime
getValue()
A date with time in the formatYYYY-MM-DDTHH:mm:ss.SSSZ
.static DateTimeField
of()
factory methodstatic DateTimeField
of
(DateTimeField template) factory method to create a shallow copy DateTimeFieldvoid
setValue
(ZonedDateTime value) A date with time in the formatYYYY-MM-DDTHH:mm:ss.SSSZ
.static com.fasterxml.jackson.core.type.TypeReference<DateTimeField>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDateTimeField
(Function<DateTimeField, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.customfields.CustomField
getType, withCustomField
-
Field Details
-
DATE_TIME
discriminator value for DateTimeField- See Also:
-
-
Method Details
-
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
-
setValue
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
-
of
factory method- Returns:
- instance of DateTimeField
-
of
factory method to create a shallow copy DateTimeField- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
DateTimeField copyDeep()- Specified by:
copyDeep
in interfaceCustomField
-
deepCopy
factory method to create a deep copy of DateTimeField- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DateTimeField- Returns:
- builder
-
builder
create builder for DateTimeField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDateTimeField
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
-