Class TimeAttributeBuilder
java.lang.Object
com.commercetools.importapi.models.productvariants.TimeAttributeBuilder
- All Implemented Interfaces:
Builder<TimeAttribute>
TimeAttributeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TimeAttribute timeAttribute = TimeAttribute.builder()
.value(LocalTime.parse("12:00:00.301"))
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds TimeAttribute with checking for non-null required valuesbuilds TimeAttribute without checking for non-null required valuesgetName()
Required if used for ProductVariantImport.getValue()
A time value in the formatHH:mm:ss.SSS
.Required if used for ProductVariantImport.static TimeAttributeBuilder
of()
factory method for an instance of TimeAttributeBuilderstatic TimeAttributeBuilder
of
(TimeAttribute template) create builder for TimeAttribute instanceA time value in the formatHH:mm:ss.SSS
.
-
Constructor Details
-
TimeAttributeBuilder
public TimeAttributeBuilder()
-
-
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 time value in the format
HH:mm:ss.SSS
. 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 time value in the format
HH:mm:ss.SSS
. 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 TimeAttribute with checking for non-null required values- Specified by:
build
in interfaceBuilder<TimeAttribute>
- Returns:
- TimeAttribute
-
buildUnchecked
builds TimeAttribute without checking for non-null required values- Returns:
- TimeAttribute
-
of
factory method for an instance of TimeAttributeBuilder- Returns:
- builder
-
of
create builder for TimeAttribute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-