Class ProductAddToCategoryActionBuilder
java.lang.Object
com.commercetools.api.models.product.ProductAddToCategoryActionBuilder
- All Implemented Interfaces:
Builder<ProductAddToCategoryAction>
public class ProductAddToCategoryActionBuilder
extends Object
implements Builder<ProductAddToCategoryAction>
ProductAddToCategoryActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductAddToCategoryAction productAddToCategoryAction = ProductAddToCategoryAction.builder()
.category(categoryBuilder -> categoryBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductAddToCategoryAction with checking for non-null required valuesbuilds ProductAddToCategoryAction without checking for non-null required valuescategory
(CategoryResourceIdentifier category) The Category to add.The Category to add.The Category to add.A string representing a number between 0 and 1.Iftrue
, only the stagedcategories
andcategoryOrderHints
are updated.of()
factory method for an instance of ProductAddToCategoryActionBuilderof
(ProductAddToCategoryAction template) create builder for ProductAddToCategoryAction instanceA string representing a number between 0 and 1.Iftrue
, only the stagedcategories
andcategoryOrderHints
are updated.The Category to add.
-
Constructor Details
-
ProductAddToCategoryActionBuilder
public ProductAddToCategoryActionBuilder()
-
-
Method Details
-
category
public ProductAddToCategoryActionBuilder category(Function<CategoryResourceIdentifierBuilder, CategoryResourceIdentifierBuilder> builder) The Category to add.
- Parameters:
builder
- function to build the category value- Returns:
- Builder
-
withCategory
public ProductAddToCategoryActionBuilder withCategory(Function<CategoryResourceIdentifierBuilder, CategoryResourceIdentifier> builder) The Category to add.
- Parameters:
builder
- function to build the category value- Returns:
- Builder
-
category
The Category to add.
- Parameters:
category
- value to be set- Returns:
- Builder
-
orderHint
A string representing a number between 0 and 1. Must start with
0.
and cannot end with0
. If empty, any existing value will be removed.- Parameters:
orderHint
- value to be set- Returns:
- Builder
-
staged
If
true
, only the stagedcategories
andcategoryOrderHints
are updated. Iffalse
, both the current and stagedcategories
andcategoryOrderHints
are updated.- Parameters:
staged
- value to be set- Returns:
- Builder
-
getCategory
The Category to add.
- Returns:
- category
-
getOrderHint
A string representing a number between 0 and 1. Must start with
0.
and cannot end with0
. If empty, any existing value will be removed.- Returns:
- orderHint
-
getStaged
If
true
, only the stagedcategories
andcategoryOrderHints
are updated. Iffalse
, both the current and stagedcategories
andcategoryOrderHints
are updated.- Returns:
- staged
-
build
builds ProductAddToCategoryAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductAddToCategoryAction>
- Returns:
- ProductAddToCategoryAction
-
buildUnchecked
builds ProductAddToCategoryAction without checking for non-null required values- Returns:
- ProductAddToCategoryAction
-
of
factory method for an instance of ProductAddToCategoryActionBuilder- Returns:
- builder
-
of
create builder for ProductAddToCategoryAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-