Class SyncInfoBuilder

java.lang.Object
com.commercetools.history.models.common.SyncInfoBuilder
All Implemented Interfaces:
Builder<SyncInfo>

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

     SyncInfo syncInfo = SyncInfo.builder()
             .channel(channelBuilder -> channelBuilder)
             .externalId("{externalId}")
             .syncedAt("{syncedAt}")
             .build()
 
  • Constructor Details

    • SyncInfoBuilder

      public SyncInfoBuilder()
  • Method Details

    • channel

      set the value to the channel using the builder function
      Parameters:
      builder - function to build the channel value
      Returns:
      Builder
    • withChannel

      public SyncInfoBuilder withChannel(Function<ReferenceBuilder,Reference> builder)
      set the value to the channel using the builder function
      Parameters:
      builder - function to build the channel value
      Returns:
      Builder
    • channel

      public SyncInfoBuilder channel(Reference channel)
      set the value to the channel
      Parameters:
      channel - value to be set
      Returns:
      Builder
    • externalId

      public SyncInfoBuilder externalId(String externalId)

      Can be used to reference an external order instance, file etc.

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

      public SyncInfoBuilder syncedAt(String syncedAt)
      set the value to the syncedAt
      Parameters:
      syncedAt - value to be set
      Returns:
      Builder
    • getChannel

      public Reference getChannel()
      value of channel}
      Returns:
      channel
    • getExternalId

      public String getExternalId()

      Can be used to reference an external order instance, file etc.

      Returns:
      externalId
    • getSyncedAt

      public String getSyncedAt()
      value of syncedAt}
      Returns:
      syncedAt
    • build

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

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

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

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