Class ProductSetAttributeInAllVariantsActionBuilder

java.lang.Object
com.commercetools.api.models.product.ProductSetAttributeInAllVariantsActionBuilder
All Implemented Interfaces:
Builder<ProductSetAttributeInAllVariantsAction>

public class ProductSetAttributeInAllVariantsActionBuilder extends Object implements Builder<ProductSetAttributeInAllVariantsAction>
ProductSetAttributeInAllVariantsActionBuilder
Example to create an instance using the builder pattern

     ProductSetAttributeInAllVariantsAction productSetAttributeInAllVariantsAction = ProductSetAttributeInAllVariantsAction.builder()
             .name("{name}")
             .build()
 
  • Constructor Details

    • ProductSetAttributeInAllVariantsActionBuilder

      public ProductSetAttributeInAllVariantsActionBuilder()
  • Method Details

    • name

      The name of the Attribute to set.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • value

      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.
      Parameters:
      value - value to be set
      Returns:
      Builder
    • staged

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

      Parameters:
      staged - value to be set
      Returns:
      Builder
    • getName

      public String getName()

      The name of the Attribute to set.

      Returns:
      name
    • getValue

      @Nullable 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.
      Returns:
      value
    • getStaged

      @Nullable public Boolean getStaged()

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

      Returns:
      staged
    • build

      builds ProductSetAttributeInAllVariantsAction with checking for non-null required values
      Specified by:
      build in interface Builder<ProductSetAttributeInAllVariantsAction>
      Returns:
      ProductSetAttributeInAllVariantsAction
    • buildUnchecked

      public ProductSetAttributeInAllVariantsAction buildUnchecked()
      builds ProductSetAttributeInAllVariantsAction without checking for non-null required values
      Returns:
      ProductSetAttributeInAllVariantsAction
    • of

      factory method for an instance of ProductSetAttributeInAllVariantsActionBuilder
      Returns:
      builder
    • of

      create builder for ProductSetAttributeInAllVariantsAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder