Class ProductSetAttributeActionImpl

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

public class ProductSetAttributeActionImpl extends Object implements ProductSetAttributeAction, io.vrap.rmf.base.client.ModelBase

Either variantId or sku is required.

  • Constructor Details

    • ProductSetAttributeActionImpl

      public ProductSetAttributeActionImpl()
      create empty instance
  • Method Details

    • getAction

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

      public Long getVariantId()

      The id of the ProductVariant to update.

      Specified by:
      getVariantId in interface ProductSetAttributeAction
      Returns:
      variantId
    • getSku

      public String getSku()

      The sku of the ProductVariant to update.

      Specified by:
      getSku in interface ProductSetAttributeAction
      Returns:
      sku
    • getName

      public String getName()

      The name of the Attribute to set.

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

      public Object getValue()

      Value to set for the Attribute. 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 ProductSetAttributeAction
      Returns:
      value
    • getStaged

      public Boolean getStaged()

      If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

      Specified by:
      getStaged in interface ProductSetAttributeAction
      Returns:
      staged
    • setVariantId

      public void setVariantId(Long variantId)
      Description copied from interface: ProductSetAttributeAction

      The id of the ProductVariant to update.

      Specified by:
      setVariantId in interface ProductSetAttributeAction
      Parameters:
      variantId - value to be set
    • setSku

      public void setSku(String sku)
      Description copied from interface: ProductSetAttributeAction

      The sku of the ProductVariant to update.

      Specified by:
      setSku in interface ProductSetAttributeAction
      Parameters:
      sku - value to be set
    • setName

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

      The name of the Attribute to set.

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

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

      Value to set for the Attribute. 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 ProductSetAttributeAction
      Parameters:
      value - value to be set
    • setStaged

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

      If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

      Specified by:
      setStaged in interface ProductSetAttributeAction
      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