Class DateTimeFieldBuilder

java.lang.Object
com.commercetools.importapi.models.customfields.DateTimeFieldBuilder
All Implemented Interfaces:
Builder<DateTimeField>

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

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

    • DateTimeFieldBuilder

      public DateTimeFieldBuilder()
  • Method Details

    • value

      public DateTimeFieldBuilder value(ZonedDateTime value)
      set the value to the value
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getValue

      public ZonedDateTime getValue()
      value of value}
      Returns:
      value
    • build

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

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

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

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