Class ProductSetAssetKeyActionBuilder

java.lang.Object
com.commercetools.api.models.product.ProductSetAssetKeyActionBuilder
All Implemented Interfaces:
Builder<ProductSetAssetKeyAction>

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

     ProductSetAssetKeyAction productSetAssetKeyAction = ProductSetAssetKeyAction.builder()
             .assetId("{assetId}")
             .build()
 
  • Constructor Details

    • ProductSetAssetKeyActionBuilder

      public ProductSetAssetKeyActionBuilder()
  • Method Details

    • variantId

      public ProductSetAssetKeyActionBuilder 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 Asset is updated. If false, both the current and staged Asset is updated.

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

      public ProductSetAssetKeyActionBuilder assetId(String assetId)

      The id of the Asset to update.

      Parameters:
      assetId - value to be set
      Returns:
      Builder
    • assetKey

      public ProductSetAssetKeyActionBuilder assetKey(@Nullable String assetKey)

      Value to set. If empty, any existing value will be removed.

      Parameters:
      assetKey - 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 Asset is updated. If false, both the current and staged Asset is updated.

      Returns:
      staged
    • getAssetId

      public String getAssetId()

      The id of the Asset to update.

      Returns:
      assetId
    • getAssetKey

      @Nullable public String getAssetKey()

      Value to set. If empty, any existing value will be removed.

      Returns:
      assetKey
    • build

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

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

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

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