Class ShoppingListLineItemValueBuilder
java.lang.Object
com.commercetools.history.models.change_value.ShoppingListLineItemValueBuilder
- All Implemented Interfaces:
Builder<ShoppingListLineItemValue>
public class ShoppingListLineItemValueBuilder
extends Object
implements Builder<ShoppingListLineItemValue>
ShoppingListLineItemValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ShoppingListLineItemValue shoppingListLineItemValue = ShoppingListLineItemValue.builder()
.id("{id}")
.name(nameBuilder -> nameBuilder)
.variantId(1)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ShoppingListLineItemValue with checking for non-null required valuesbuilds ShoppingListLineItemValue without checking for non-null required valuesgetId()
id
of the ShoppingListLineItem.getName()
Name of the corresponding Product the Product Variant belongs to.id
of the ProductVariant the ShoppingListLineItem refers to.id
of the ShoppingListLineItem.name
(LocalizedString name) Name of the corresponding Product the Product Variant belongs to.Name of the corresponding Product the Product Variant belongs to.of()
factory method for an instance of ShoppingListLineItemValueBuilderof
(ShoppingListLineItemValue template) create builder for ShoppingListLineItemValue instanceid
of the ProductVariant the ShoppingListLineItem refers to.Name of the corresponding Product the Product Variant belongs to.
-
Constructor Details
-
ShoppingListLineItemValueBuilder
public ShoppingListLineItemValueBuilder()
-
-
Method Details
-
id
id
of the ShoppingListLineItem.- Parameters:
id
- value to be set- Returns:
- Builder
-
name
public ShoppingListLineItemValueBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the corresponding Product the Product Variant belongs to.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public ShoppingListLineItemValueBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the corresponding Product the Product Variant belongs to.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the corresponding Product the Product Variant belongs to.
- Parameters:
name
- value to be set- Returns:
- Builder
-
variantId
id
of the ProductVariant the ShoppingListLineItem refers to.- Parameters:
variantId
- value to be set- Returns:
- Builder
-
getId
id
of the ShoppingListLineItem.- Returns:
- id
-
getName
Name of the corresponding Product the Product Variant belongs to.
- Returns:
- name
-
getVariantId
id
of the ProductVariant the ShoppingListLineItem refers to.- Returns:
- variantId
-
build
builds ShoppingListLineItemValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ShoppingListLineItemValue>
- Returns:
- ShoppingListLineItemValue
-
buildUnchecked
builds ShoppingListLineItemValue without checking for non-null required values- Returns:
- ShoppingListLineItemValue
-
of
factory method for an instance of ShoppingListLineItemValueBuilder- Returns:
- builder
-
of
create builder for ShoppingListLineItemValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-