Class TimeAttributeBuilder

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

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

     TimeAttribute timeAttribute = TimeAttribute.builder()
             .value(LocalTime.parse("12:00:00.301"))
             .build()
 
  • Constructor Details

    • TimeAttributeBuilder

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

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

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

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

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