Interface VariantSetAttributesAction
- All Superinterfaces:
VariantUpdateAction
Sets the attributes of the Variant. Existing attributes will be replaced with the new ones.
Example to create an instance using the builder pattern
VariantSetAttributesAction variantSetAttributesAction = VariantSetAttributesAction.builder()
.plusAttributes(attributesBuilder -> attributesBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for VariantSetAttributesAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for VariantSetAttributesActionbuilder(VariantSetAttributesAction template) create builder for VariantSetAttributesAction instancecopyDeep()static VariantSetAttributesActiondeepCopy(VariantSetAttributesAction template) factory method to create a deep copy of VariantSetAttributesActionAttributes to set for the Variant according to the respective AttributeDefinition.Iftrue, only the staged attributes are updated.static VariantSetAttributesActionof()factory methodstatic VariantSetAttributesActionof(VariantSetAttributesAction template) factory method to create a shallow copy VariantSetAttributesActionvoidsetAttributes(Attribute... attributes) Attributes to set for the Variant according to the respective AttributeDefinition.voidsetAttributes(List<Attribute> attributes) Attributes to set for the Variant according to the respective AttributeDefinition.voidIftrue, only the staged attributes are updated.static tools.jackson.core.type.TypeReference<VariantSetAttributesAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.variant.VariantUpdateAction
getAction, withVariantUpdateAction
-
Field Details
-
SET_ATTRIBUTES
discriminator value for VariantSetAttributesAction- See Also:
-
-
Method Details
-
getAttributes
Attributes to set for the Variant according to the respective AttributeDefinition.
- Returns:
- attributes
-
getStaged
Boolean getStaged()If
true, only the staged attributes are updated. Iffalse, both the current and staged attributes are updated.- Returns:
- staged
-
setAttributes
Attributes to set for the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- values to be set
-
setAttributes
Attributes to set for the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- values to be set
-
setStaged
If
true, only the staged attributes are updated. Iffalse, both the current and staged attributes are updated.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of VariantSetAttributesAction
-
of
factory method to create a shallow copy VariantSetAttributesAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
VariantSetAttributesAction copyDeep()- Specified by:
copyDeepin interfaceVariantUpdateAction
-
deepCopy
factory method to create a deep copy of VariantSetAttributesAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for VariantSetAttributesAction- Returns:
- builder
-
builder
create builder for VariantSetAttributesAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariantSetAttributesAction
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
-