Class VariantChangeAssetOrderActionBuilder

java.lang.Object
com.commercetools.api.models.variant.VariantChangeAssetOrderActionBuilder
All Implemented Interfaces:
Builder<VariantChangeAssetOrderAction>

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

     VariantChangeAssetOrderAction variantChangeAssetOrderAction = VariantChangeAssetOrderAction.builder()
             .plusAssetOrder(assetOrderBuilder -> assetOrderBuilder)
             .build()
 
  • Constructor Details

    • VariantChangeAssetOrderActionBuilder

      public VariantChangeAssetOrderActionBuilder()
  • Method Details

    • staged

      public VariantChangeAssetOrderActionBuilder staged(@Nullable Boolean staged)

      If true, only the staged assets is updated. If false, both the current and staged assets are updated.

      Parameters:
      staged - value to be set
      Returns:
      Builder
    • assetOrder

      public VariantChangeAssetOrderActionBuilder assetOrder(String... assetOrder)

      All existing Asset ids of the Variant in the desired new order.

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

      public VariantChangeAssetOrderActionBuilder assetOrder(List<String> assetOrder)

      All existing Asset ids of the Variant in the desired new order.

      Parameters:
      assetOrder - value to be set
      Returns:
      Builder
    • plusAssetOrder

      public VariantChangeAssetOrderActionBuilder plusAssetOrder(String... assetOrder)

      All existing Asset ids of the Variant in the desired new order.

      Parameters:
      assetOrder - value to be set
      Returns:
      Builder
    • getStaged

      @Nullable public Boolean getStaged()

      If true, only the staged assets is updated. If false, both the current and staged assets are updated.

      Returns:
      staged
    • getAssetOrder

      public List<String> getAssetOrder()

      All existing Asset ids of the Variant in the desired new order.

      Returns:
      assetOrder
    • build

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

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

      factory method for an instance of VariantChangeAssetOrderActionBuilder
      Returns:
      builder
    • of

      create builder for VariantChangeAssetOrderAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder