Class ShoppingListUpdateBuilder

java.lang.Object
com.commercetools.api.models.shopping_list.ShoppingListUpdateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ShoppingListUpdate>

public class ShoppingListUpdateBuilder extends Object implements io.vrap.rmf.base.client.Builder<ShoppingListUpdate>
ShoppingListUpdateBuilder
Example to create an instance using the builder pattern

     ShoppingListUpdate shoppingListUpdate = ShoppingListUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ShoppingListUpdateBuilder

      public ShoppingListUpdateBuilder()
  • Method Details

    • version

      public ShoppingListUpdateBuilder version(Long version)

      Expected version of the ShoppingList on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

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

      List of update actions to be performed on the ShoppingList.

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

      List of update actions to be performed on the ShoppingList.

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

      public ShoppingListUpdateBuilder plusActions(ShoppingListUpdateAction... actions)

      List of update actions to be performed on the ShoppingList.

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

      public ShoppingListUpdateBuilder plusActions(Function<ShoppingListUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ShoppingListUpdateAction>> builder)

      List of update actions to be performed on the ShoppingList.

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

      public ShoppingListUpdateBuilder withActions(Function<ShoppingListUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ShoppingListUpdateAction>> builder)

      List of update actions to be performed on the ShoppingList.

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

      public Long getVersion()

      Expected version of the ShoppingList on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

      Returns:
      version
    • getActions

      public List<ShoppingListUpdateAction> getActions()

      List of update actions to be performed on the ShoppingList.

      Returns:
      actions
    • build

      public ShoppingListUpdate build()
      builds ShoppingListUpdate with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ShoppingListUpdate>
      Returns:
      ShoppingListUpdate
    • buildUnchecked

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

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

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