Class ZoneUpdateBuilder

java.lang.Object
com.commercetools.api.models.zone.ZoneUpdateBuilder
All Implemented Interfaces:
Builder<ZoneUpdate>

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

     ZoneUpdate zoneUpdate = ZoneUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ZoneUpdateBuilder

      public ZoneUpdateBuilder()
  • Method Details

    • version

      public ZoneUpdateBuilder version(Long version)

      Expected version of the Zone 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 ZoneUpdateBuilder actions(ZoneUpdateAction... actions)

      Update actions to be performed on the Zone.

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

      public ZoneUpdateBuilder actions(List<ZoneUpdateAction> actions)

      Update actions to be performed on the Zone.

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

      public ZoneUpdateBuilder plusActions(ZoneUpdateAction... actions)

      Update actions to be performed on the Zone.

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

      Update actions to be performed on the Zone.

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

      Update actions to be performed on the Zone.

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

      public Long getVersion()

      Expected version of the Zone 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<ZoneUpdateAction> getActions()

      Update actions to be performed on the Zone.

      Returns:
      actions
    • build

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

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

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

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