Class DateTimeAttributeBuilder

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

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

     DateTimeAttribute dateTimeAttribute = DateTimeAttribute.builder()
             .value(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Constructor Details

    • DateTimeAttributeBuilder

      public DateTimeAttributeBuilder()
  • 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

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

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

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

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

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