Class ProductTypeUpdateBuilder

java.lang.Object
com.commercetools.api.models.product_type.ProductTypeUpdateBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProductTypeUpdate>

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

     ProductTypeUpdate productTypeUpdate = ProductTypeUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • ProductTypeUpdateBuilder

      public ProductTypeUpdateBuilder()
  • Method Details

    • version

      public ProductTypeUpdateBuilder version(Long version)

      Expected version of the ProductType 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

      Update actions to be performed on the ProductType.

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

      Update actions to be performed on the ProductType.

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

      public ProductTypeUpdateBuilder plusActions(ProductTypeUpdateAction... actions)

      Update actions to be performed on the ProductType.

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

      public ProductTypeUpdateBuilder plusActions(Function<ProductTypeUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ProductTypeUpdateAction>> builder)

      Update actions to be performed on the ProductType.

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

      public ProductTypeUpdateBuilder withActions(Function<ProductTypeUpdateActionBuilder,io.vrap.rmf.base.client.Builder<? extends ProductTypeUpdateAction>> builder)

      Update actions to be performed on the ProductType.

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

      public Long getVersion()

      Expected version of the ProductType 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<ProductTypeUpdateAction> getActions()

      Update actions to be performed on the ProductType.

      Returns:
      actions
    • build

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

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

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

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