Class EnumSetAttributeBuilder

java.lang.Object
com.commercetools.importapi.models.productvariants.EnumSetAttributeBuilder
All Implemented Interfaces:
Builder<EnumSetAttribute>

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

     EnumSetAttribute enumSetAttribute = EnumSetAttribute.builder()
             .plusValue(valueBuilder -> valueBuilder)
             .build()
 
  • Constructor Details

    • EnumSetAttributeBuilder

      public EnumSetAttributeBuilder()
  • Method Details

    • name

      The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.

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

      public EnumSetAttributeBuilder value(String... value)
      set values to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • value

      public EnumSetAttributeBuilder value(List<String> value)
      set value to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • plusValue

      public EnumSetAttributeBuilder plusValue(String... value)
      add values to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getName

      @Nullable public String getName()

      The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.

      Returns:
      name
    • getValue

      public List<String> getValue()
      value of value}
      Returns:
      value
    • build

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

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

      public static EnumSetAttributeBuilder of()
      factory method for an instance of EnumSetAttributeBuilder
      Returns:
      builder
    • of

      public static EnumSetAttributeBuilder of(EnumSetAttribute template)
      create builder for EnumSetAttribute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder