Class ChannelUpdateBuilder

java.lang.Object
com.commercetools.api.models.channel.ChannelUpdateBuilder
All Implemented Interfaces:
Builder<ChannelUpdate>

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

     ChannelUpdate channelUpdate = ChannelUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ChannelUpdateBuilder

      public ChannelUpdateBuilder()
  • Method Details

    • version

      public ChannelUpdateBuilder version(Long version)

      Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

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

      public ChannelUpdateBuilder actions(ChannelUpdateAction... actions)

      Update actions to be performed on the Channel.

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

      public ChannelUpdateBuilder actions(List<ChannelUpdateAction> actions)

      Update actions to be performed on the Channel.

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

      public ChannelUpdateBuilder plusActions(ChannelUpdateAction... actions)

      Update actions to be performed on the Channel.

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

      Update actions to be performed on the Channel.

      Parameters:
      builder - function to build the actions value
      Returns:
      Builder
    • withActions

      Update actions to be performed on the Channel.

      Parameters:
      builder - function to build the actions value
      Returns:
      Builder
    • getVersion

      public Long getVersion()

      Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Returns:
      version
    • getActions

      public List<ChannelUpdateAction> getActions()

      Update actions to be performed on the Channel.

      Returns:
      actions
    • build

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

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

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

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