Class TypeUpdateBuilder

java.lang.Object
com.commercetools.api.models.type.TypeUpdateBuilder
All Implemented Interfaces:
Builder<TypeUpdate>

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

     TypeUpdate typeUpdate = TypeUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • TypeUpdateBuilder

      public TypeUpdateBuilder()
  • Method Details

    • version

      public TypeUpdateBuilder version(Long version)

      Expected version of the type 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 TypeUpdateBuilder actions(TypeUpdateAction... actions)

      Update actions to be performed on the Type.

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

      public TypeUpdateBuilder actions(List<TypeUpdateAction> actions)

      Update actions to be performed on the Type.

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

      public TypeUpdateBuilder plusActions(TypeUpdateAction... actions)

      Update actions to be performed on the Type.

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

      Update actions to be performed on the Type.

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

      Update actions to be performed on the Type.

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

      public Long getVersion()

      Expected version of the type 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<TypeUpdateAction> getActions()

      Update actions to be performed on the Type.

      Returns:
      actions
    • build

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

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

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

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