Interface ProductTailoringSetAttributeInAllVariantsAction
- All Superinterfaces:
ProductTailoringUpdateAction
Adds, removes, or changes a tailored Attribute in all Product Variants of a Product at the same time. This action is useful for setting tailored values for Attributes with the Constraint SameForAll.
Example to create an instance using the builder pattern
ProductTailoringSetAttributeInAllVariantsAction productTailoringSetAttributeInAllVariantsAction = ProductTailoringSetAttributeInAllVariantsAction.builder()
.name("{name}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for ProductTailoringSetAttributeInAllVariantsAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductTailoringSetAttributeInAllVariantsActioncreate builder for ProductTailoringSetAttributeInAllVariantsAction instancecopyDeep()factory method to create a deep copy of ProductTailoringSetAttributeInAllVariantsAction@NotNull StringgetName()The name of the Attribute to set.Iftrue, only the staged Attributes are set.getValue()Value to set for the Attributes.of()factory methodfactory method to create a shallow copy ProductTailoringSetAttributeInAllVariantsActionvoidThe name of the Attribute to set.voidIftrue, only the staged Attributes are set.voidValue to set for the Attributes.static com.fasterxml.jackson.core.type.TypeReference<ProductTailoringSetAttributeInAllVariantsAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductTailoringSetAttributeInAllVariantsAction(Function<ProductTailoringSetAttributeInAllVariantsAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product_tailoring.ProductTailoringUpdateAction
getAction, withProductTailoringUpdateAction
-
Field Details
-
SET_ATTRIBUTE_IN_ALL_VARIANTS
discriminator value for ProductTailoringSetAttributeInAllVariantsAction- See Also:
-
-
Method Details
-
getName
The name of the Attribute to set.
- Returns:
- name
-
getValue
Object getValue()Value to set for the Attributes. If empty, any existing value will be removed.
The AttributeType determines the format of the Attribute
valueto be provided:- For Enum Type and Localized Enum Type, use the
keyof the Plain Enum Value or Localized Enum Value objects, or the complete objects asvalue. - For Localizable Text Type, use the LocalizedString object as
value. - For Money Type Attributes, use the Money object as
value. - For Set Type Attributes, use the entire
setobject asvalue. - For Reference Type Attributes, use the Reference object as
value.
Tailoring of Nested Type Attributes is not supported.
- Returns:
- value
- For Enum Type and Localized Enum Type, use the
-
getStaged
Boolean getStaged()If
true, only the staged Attributes are set. Iffalse, both the current and staged Attributes are set.- Returns:
- staged
-
setName
The name of the Attribute to set.
- Parameters:
name- value to be set
-
setValue
Value to set for the Attributes. If empty, any existing value will be removed.
The AttributeType determines the format of the Attribute
valueto be provided:- For Enum Type and Localized Enum Type, use the
keyof the Plain Enum Value or Localized Enum Value objects, or the complete objects asvalue. - For Localizable Text Type, use the LocalizedString object as
value. - For Money Type Attributes, use the Money object as
value. - For Set Type Attributes, use the entire
setobject asvalue. - For Reference Type Attributes, use the Reference object as
value.
Tailoring of Nested Type Attributes is not supported.
- Parameters:
value- value to be set
- For Enum Type and Localized Enum Type, use the
-
setStaged
If
true, only the staged Attributes are set. Iffalse, both the current and staged Attributes are set.- Parameters:
staged- value to be set
-
of
factory method- Returns:
- instance of ProductTailoringSetAttributeInAllVariantsAction
-
of
static ProductTailoringSetAttributeInAllVariantsAction of(ProductTailoringSetAttributeInAllVariantsAction template) factory method to create a shallow copy ProductTailoringSetAttributeInAllVariantsAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
- Specified by:
copyDeepin interfaceProductTailoringUpdateAction
-
deepCopy
@Nullable static ProductTailoringSetAttributeInAllVariantsAction deepCopy(@Nullable ProductTailoringSetAttributeInAllVariantsAction template) factory method to create a deep copy of ProductTailoringSetAttributeInAllVariantsAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductTailoringSetAttributeInAllVariantsAction- Returns:
- builder
-
builder
static ProductTailoringSetAttributeInAllVariantsActionBuilder builder(ProductTailoringSetAttributeInAllVariantsAction template) create builder for ProductTailoringSetAttributeInAllVariantsAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductTailoringSetAttributeInAllVariantsAction
default <T> T withProductTailoringSetAttributeInAllVariantsAction(Function<ProductTailoringSetAttributeInAllVariantsAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ProductTailoringSetAttributeInAllVariantsAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-