Class TextLineItemDraftBuilder
- All Implemented Interfaces:
Builder<TextLineItemDraft>
Example to create an instance using the builder pattern
TextLineItemDraft textLineItemDraft = TextLineItemDraft.builder()
.name(nameBuilder -> nameBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddedAt
(ZonedDateTime addedAt) Date and time the TextLineItem is added to the ShoppingList.build()
builds TextLineItemDraft with checking for non-null required valuesbuilds TextLineItemDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the TextLineItem.Custom Fields for the TextLineItem.description
(LocalizedString description) Description of the TextLineItem.Description of the TextLineItem.Date and time the TextLineItem is added to the ShoppingList.Custom Fields for the TextLineItem.Description of the TextLineItem.getKey()
User-defined unique identifier of the TextLineItem.getName()
Name of the TextLineItem.Number of entries in the TextLineItem.User-defined unique identifier of the TextLineItem.name
(LocalizedString name) Name of the TextLineItem.Name of the TextLineItem.static TextLineItemDraftBuilder
of()
factory method for an instance of TextLineItemDraftBuilderstatic TextLineItemDraftBuilder
of
(TextLineItemDraft template) create builder for TextLineItemDraft instanceNumber of entries in the TextLineItem.Custom Fields for the TextLineItem.Description of the TextLineItem.Name of the TextLineItem.
-
Constructor Details
-
TextLineItemDraftBuilder
public TextLineItemDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier of the TextLineItem. Must be unique per ShoppingList.
- Parameters:
key
- value to be set- Returns:
- Builder
-
addedAt
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- Returns:
- Builder
-
custom
public TextLineItemDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the TextLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public TextLineItemDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the TextLineItem.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the TextLineItem.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
description
public TextLineItemDraftBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the TextLineItem.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public TextLineItemDraftBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the TextLineItem.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the TextLineItem.
- Parameters:
description
- value to be set- Returns:
- Builder
-
name
public TextLineItemDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the TextLineItem.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the TextLineItem.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the TextLineItem.
- Parameters:
name
- value to be set- Returns:
- Builder
-
quantity
Number of entries in the TextLineItem.
- Parameters:
quantity
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier of the TextLineItem. Must be unique per ShoppingList.
- Returns:
- key
-
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.
- Returns:
- custom
-
getDescription
Description of the TextLineItem.
- Returns:
- description
-
getName
Name of the TextLineItem.
- Returns:
- name
-
getQuantity
Number of entries in the TextLineItem.
- Returns:
- quantity
-
build
builds TextLineItemDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<TextLineItemDraft>
- Returns:
- TextLineItemDraft
-
buildUnchecked
builds TextLineItemDraft without checking for non-null required values- Returns:
- TextLineItemDraft
-
of
factory method for an instance of TextLineItemDraftBuilder- Returns:
- builder
-
of
create builder for TextLineItemDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-