Class ZoneUpdateBuilder

java.lang.Object
com.commercetools.api.models.zone.ZoneUpdateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ZoneUpdate>

public class ZoneUpdateBuilder extends Object implements io.vrap.rmf.base.client.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

  • 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 is returned.

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

      Update actions to be performed on the Zone.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • 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:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      public ZoneUpdateBuilder plusActions(Function<ZoneUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ZoneUpdateAction>> builder)

      Update actions to be performed on the Zone.

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

      public ZoneUpdateBuilder withActions(Function<ZoneUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ZoneUpdateAction>> builder)

      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 is returned.

      Returns:
      version
    • 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 io.vrap.rmf.base.client.Builder<ZoneUpdate>
      Returns:
      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