Class DateTimeSetAttributeBuilder

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

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

     DateTimeSetAttribute dateTimeSetAttribute = DateTimeSetAttribute.builder()
             .plusValue(valueBuilder -> valueBuilder)
             .build()
 
  • Constructor Details

    • DateTimeSetAttributeBuilder

      public DateTimeSetAttributeBuilder()
  • Method Details

    • name

      public DateTimeSetAttributeBuilder name(@Nullable String name)

      Required if used for ProductVariantImport. Must not be set if used for ProductVariantPatch.

      Must match name of an AttributeDefinition of the Product Type.

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

      public DateTimeSetAttributeBuilder value(ZonedDateTime... value)

      A set of dates with time in the format YYYY-MM-DDTHH:mm:ss.SSSZ. The time zone is optional and defaults to UTC if not specified. If the time zone is specified, it must be in the format ±HH:mm or Z for UTC.

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

      A set of dates with time in the format YYYY-MM-DDTHH:mm:ss.SSSZ. The time zone is optional and defaults to UTC if not specified. If the time zone is specified, it must be in the format ±HH:mm or Z for UTC.

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

      public DateTimeSetAttributeBuilder plusValue(ZonedDateTime... value)

      A set of dates with time in the format YYYY-MM-DDTHH:mm:ss.SSSZ. The time zone is optional and defaults to UTC if not specified. If the time zone is specified, it must be in the format ±HH:mm or Z for UTC.

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

      @Nullable public String getName()

      Required if used for ProductVariantImport. Must not be set if used for ProductVariantPatch.

      Must match name of an AttributeDefinition of the Product Type.

      Returns:
      name
    • getValue

      public List<ZonedDateTime> getValue()

      A set of dates with time in the format YYYY-MM-DDTHH:mm:ss.SSSZ. The time zone is optional and defaults to UTC if not specified. If the time zone is specified, it must be in the format ±HH:mm or Z for UTC.

      Returns:
      value
    • build

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

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

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

      create builder for DateTimeSetAttribute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder