Class BooleanAttributeBuilder

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

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

     BooleanAttribute booleanAttribute = BooleanAttribute.builder()
             .value(true)
             .build()
 
  • Constructor Details

    • BooleanAttributeBuilder

      public BooleanAttributeBuilder()
  • 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 BooleanAttributeBuilder value(Boolean value)
      set the value 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 Boolean getValue()
      value of value}
      Returns:
      value
    • build

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

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

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

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