Class ProductSetAttributeInAllVariantsActionImpl

java.lang.Object
com.commercetools.api.models.product.ProductSetAttributeInAllVariantsActionImpl
All Implemented Interfaces:
ProductSetAttributeInAllVariantsAction, ProductUpdateAction, ResourceUpdateAction<ProductUpdateAction>, io.vrap.rmf.base.client.ModelBase

public class ProductSetAttributeInAllVariantsActionImpl extends Object implements ProductSetAttributeInAllVariantsAction, io.vrap.rmf.base.client.ModelBase

Adds, removes, or changes a Product Attribute in all Product Variants at the same time. This action is useful for setting values for Attributes with the Constraint SameForAll.

  • Constructor Details

    • ProductSetAttributeInAllVariantsActionImpl

      public ProductSetAttributeInAllVariantsActionImpl()
      create empty instance
  • Method Details

    • getAction

      public String getAction()
      Specified by:
      getAction in interface ProductUpdateAction
      Specified by:
      getAction in interface ResourceUpdateAction<ProductUpdateAction>
      Returns:
      action
    • getName

      public String getName()

      The name of the Attribute to set.

      Specified by:
      getName in interface ProductSetAttributeInAllVariantsAction
      Returns:
      name
    • getValue

      public Object getValue()

      Value to set for the Attributes. If empty, any existing value will be removed.

      The AttributeType determines the format of the Attribute value to be provided:

      • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
      • 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 set object as value.
      • For Nested Type Attributes, use the list of values of all Attributes of the nested Product as value.
      • For Reference Type Attributes, use the Reference object as value.
      Specified by:
      getValue in interface ProductSetAttributeInAllVariantsAction
      Returns:
      value
    • getStaged

      public Boolean getStaged()

      If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

      Specified by:
      getStaged in interface ProductSetAttributeInAllVariantsAction
      Returns:
      staged
    • setName

      public void setName(String name)
      Description copied from interface: ProductSetAttributeInAllVariantsAction

      The name of the Attribute to set.

      Specified by:
      setName in interface ProductSetAttributeInAllVariantsAction
      Parameters:
      name - value to be set
    • setValue

      public void setValue(Object value)
      Description copied from interface: ProductSetAttributeInAllVariantsAction

      Value to set for the Attributes. If empty, any existing value will be removed.

      The AttributeType determines the format of the Attribute value to be provided:

      • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
      • 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 set object as value.
      • For Nested Type Attributes, use the list of values of all Attributes of the nested Product as value.
      • For Reference Type Attributes, use the Reference object as value.
      Specified by:
      setValue in interface ProductSetAttributeInAllVariantsAction
      Parameters:
      value - value to be set
    • setStaged

      public void setStaged(Boolean staged)
      Description copied from interface: ProductSetAttributeInAllVariantsAction

      If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

      Specified by:
      setStaged in interface ProductSetAttributeInAllVariantsAction
      Parameters:
      staged - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object