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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductAddToCategoryAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductAddToCategoryActionbuilder(ProductAddToCategoryAction template) create builder for ProductAddToCategoryAction instancecopyDeep()static ProductAddToCategoryActiondeepCopy(ProductAddToCategoryAction template) factory method to create a deep copy of ProductAddToCategoryAction@NotNull @Valid CategoryResourceIdentifierThe Category to add.A string representing a number between 0 and 1.Iftrue, only the stagedcategoriesandcategoryOrderHintsare updated.static ProductAddToCategoryActionof()factory methodstatic ProductAddToCategoryActionof(ProductAddToCategoryAction template) factory method to create a shallow copy ProductAddToCategoryActionvoidsetCategory(CategoryResourceIdentifier category) The Category to add.voidsetOrderHint(String orderHint) A string representing a number between 0 and 1.voidIftrue, only the stagedcategoriesandcategoryOrderHintsare updated.static com.fasterxml.jackson.core.type.TypeReference<ProductAddToCategoryAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.product.ProductUpdateAction
getAction, withProductUpdateActionMethods 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 stagedcategoriesandcategoryOrderHintsare updated. Iffalse, both the current and stagedcategoriesandcategoryOrderHintsare 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 stagedcategoriesandcategoryOrderHintsare updated. Iffalse, both the current and stagedcategoriesandcategoryOrderHintsare 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
-
copyDeep
ProductAddToCategoryAction copyDeep()- Specified by:
copyDeepin interfaceProductUpdateAction
-
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
-