Class ProductAddAssetActionBuilder

java.lang.Object
com.commercetools.api.models.product.ProductAddAssetActionBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProductAddAssetAction>

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

     ProductAddAssetAction productAddAssetAction = ProductAddAssetAction.builder()
             .asset(assetBuilder -> assetBuilder)
             .build()
 
  • Constructor Details

    • ProductAddAssetActionBuilder

      public ProductAddAssetActionBuilder()
  • Method Details

    • variantId

      public ProductAddAssetActionBuilder variantId(@Nullable Long variantId)

      The id of the ProductVariant to update.

      Parameters:
      variantId - value to be set
      Returns:
      Builder
    • sku

      The sku of the ProductVariant to update.

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

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

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

      Value to append.

      Parameters:
      builder - function to build the asset value
      Returns:
      Builder
    • withAsset

      Value to append.

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

      Value to append.

      Parameters:
      asset - value to be set
      Returns:
      Builder
    • position

      public ProductAddAssetActionBuilder position(@Nullable Integer position)

      Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

      Parameters:
      position - value to be set
      Returns:
      Builder
    • getVariantId

      @Nullable public Long getVariantId()

      The id of the ProductVariant to update.

      Returns:
      variantId
    • getSku

      @Nullable public String getSku()

      The sku of the ProductVariant to update.

      Returns:
      sku
    • getStaged

      @Nullable public Boolean getStaged()

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

      Returns:
      staged
    • getAsset

      public AssetDraft getAsset()

      Value to append.

      Returns:
      asset
    • getPosition

      @Nullable public Integer getPosition()

      Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

      Returns:
      position
    • build

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

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

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

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