Interface ProductAddToCategoryAction
- All Superinterfaces:
ProductUpdateAction
,ResourceUpdateAction<ProductUpdateAction>
Produces the ProductAddedToCategory Message.
Example to create an instance using the builder pattern
ProductAddToCategoryAction productAddToCategoryAction = ProductAddToCategoryAction.builder()
.category(categoryBuilder -> categoryBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ProductAddToCategoryAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductAddToCategoryActionbuilder
(ProductAddToCategoryAction template) create builder for ProductAddToCategoryAction instancestatic ProductAddToCategoryAction
deepCopy
(ProductAddToCategoryAction template) factory method to create a deep copy of ProductAddToCategoryAction@NotNull @Valid CategoryResourceIdentifier
The Category to add.A string representing a number between 0 and 1.Iftrue
, only the stagedcategories
andcategoryOrderHints
are updated.static ProductAddToCategoryAction
of()
factory methodstatic ProductAddToCategoryAction
of
(ProductAddToCategoryAction template) factory method to create a shallow copy ProductAddToCategoryActionvoid
setCategory
(CategoryResourceIdentifier category) The Category to add.void
setOrderHint
(String orderHint) A string representing a number between 0 and 1.void
Iftrue
, only the stagedcategories
andcategoryOrderHints
are updated.static com.fasterxml.jackson.core.type.TypeReference<ProductAddToCategoryAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_TO_CATEGORY
discriminator value for ProductAddToCategoryAction- See Also:
-
-
Method Details
-
getCategory
The Category to add.
- Returns:
- category
-
getOrderHint
String 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
Boolean getStaged()If
true
, only the stagedcategories
andcategoryOrderHints
are updated. Iffalse
, both the current and stagedcategories
andcategoryOrderHints
are updated.- Returns:
- staged
-
setCategory
The Category to add.
- Parameters:
category
- value to be set
-
setOrderHint
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
-
setStaged
If
true
, only the stagedcategories
andcategoryOrderHints
are updated. Iffalse
, both the current and stagedcategories
andcategoryOrderHints
are updated.- Parameters:
staged
- value to be set
-
of
factory method- Returns:
- instance of ProductAddToCategoryAction
-
of
factory method to create a shallow copy ProductAddToCategoryAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductAddToCategoryAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductAddToCategoryAction- Returns:
- builder
-
builder
create builder for ProductAddToCategoryAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductAddToCategoryAction
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
-