Class ProductSetAssetCustomFieldActionBuilder

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

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

     ProductSetAssetCustomFieldAction productSetAssetCustomFieldAction = ProductSetAssetCustomFieldAction.builder()
             .name("{name}")
             .build()
 
  • Constructor Details

    • ProductSetAssetCustomFieldActionBuilder

      public ProductSetAssetCustomFieldActionBuilder()
  • Method Details

    • variantId

      public ProductSetAssetCustomFieldActionBuilder variantId(@Nullable Long variantId)

      The id of the ProductVariant to update.

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

      public ProductSetAssetCustomFieldActionBuilder sku(@Nullable String sku)

      The sku of the ProductVariant to update.

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

      public ProductSetAssetCustomFieldActionBuilder staged(@Nullable Boolean 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 ProductSetAssetCustomFieldActionBuilder assetId(@Nullable String assetId)

      The id of the Asset to update.

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

      public ProductSetAssetCustomFieldActionBuilder assetKey(@Nullable String assetKey)

      The key of the Asset to update.

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

      Name of the Custom Field.

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

      public ProductSetAssetCustomFieldActionBuilder value(@Nullable Object value)

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      Parameters:
      value - 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

      @Nullable public String getAssetId()

      The id of the Asset to update.

      Returns:
      assetId
    • getAssetKey

      @Nullable public String getAssetKey()

      The key of the Asset to update.

      Returns:
      assetKey
    • getName

      public String getName()

      Name of the Custom Field.

      Returns:
      name
    • getValue

      @Nullable public Object getValue()

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      Returns:
      value
    • build

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

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

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

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