Class TimeSetAttributeBuilder

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

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

     TimeSetAttribute timeSetAttribute = TimeSetAttribute.builder()
             .plusValue(valueBuilder -> valueBuilder)
             .build()
 
  • Constructor Details

    • TimeSetAttributeBuilder

      public TimeSetAttributeBuilder()
  • 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 TimeSetAttributeBuilder value(LocalTime... value)
      set values to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • value

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

      public TimeSetAttributeBuilder plusValue(LocalTime... 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<LocalTime> getValue()
      value of value}
      Returns:
      value
    • build

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

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

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

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