Interface TextLineItemDraft
- All Superinterfaces:
CustomizableDraft<TextLineItemDraft>
,Draft<TextLineItemDraft>
public interface TextLineItemDraft
extends CustomizableDraft<TextLineItemDraft>, Draft<TextLineItemDraft>
TextLineItemDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
TextLineItemDraft textLineItemDraft = TextLineItemDraft.builder()
.name(nameBuilder -> nameBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic TextLineItemDraftBuilder
builder()
builder factory method for TextLineItemDraftstatic TextLineItemDraftBuilder
builder
(TextLineItemDraft template) create builder for TextLineItemDraft instancestatic TextLineItemDraft
deepCopy
(TextLineItemDraft template) factory method to create a deep copy of TextLineItemDraftDate and time the TextLineItem is added to the ShoppingList.@Valid CustomFieldsDraft
Custom Fields for the TextLineItem.@Valid LocalizedString
Description of the TextLineItem.getKey()
User-defined unique identifier of the TextLineItem.@NotNull @Valid LocalizedString
getName()
Name of the TextLineItem.Number of entries in the TextLineItem.static TextLineItemDraft
of()
factory methodstatic TextLineItemDraft
of
(TextLineItemDraft template) factory method to create a shallow copy TextLineItemDraftvoid
setAddedAt
(ZonedDateTime addedAt) Date and time the TextLineItem is added to the ShoppingList.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the TextLineItem.void
setDescription
(LocalizedString description) Description of the TextLineItem.void
User-defined unique identifier of the TextLineItem.void
setName
(LocalizedString name) Name of the TextLineItem.void
setQuantity
(Long quantity) Number of entries in the TextLineItem.static com.fasterxml.jackson.core.type.TypeReference<TextLineItemDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withTextLineItemDraft
(Function<TextLineItemDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String getKey()User-defined unique identifier of the TextLineItem. Must be unique per ShoppingList.
- Returns:
- key
-
getAddedAt
ZonedDateTime getAddedAt()Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.
- Returns:
- addedAt
-
getCustom
Custom Fields for the TextLineItem.
- Specified by:
getCustom
in interfaceCustomizableDraft<TextLineItemDraft>
- Returns:
- custom
-
getDescription
Description of the TextLineItem.
- Returns:
- description
-
getName
Name of the TextLineItem.
- Returns:
- name
-
getQuantity
Long getQuantity()Number of entries in the TextLineItem.
- Returns:
- quantity
-
setKey
User-defined unique identifier of the TextLineItem. Must be unique per ShoppingList.
- Parameters:
key
- value to be set
-
setAddedAt
Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.
- Parameters:
addedAt
- value to be set
-
setCustom
Custom Fields for the TextLineItem.
- Specified by:
setCustom
in interfaceCustomizableDraft<TextLineItemDraft>
- Parameters:
custom
- value to be set
-
setDescription
Description of the TextLineItem.
- Parameters:
description
- value to be set
-
setName
Name of the TextLineItem.
- Parameters:
name
- value to be set
-
setQuantity
Number of entries in the TextLineItem.
- Parameters:
quantity
- value to be set
-
of
factory method- Returns:
- instance of TextLineItemDraft
-
of
factory method to create a shallow copy TextLineItemDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of TextLineItemDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TextLineItemDraft- Returns:
- builder
-
builder
create builder for TextLineItemDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withTextLineItemDraft
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
-