Class ProductRemoveImageActionBuilder

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

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

     ProductRemoveImageAction productRemoveImageAction = ProductRemoveImageAction.builder()
             .imageUrl("{imageUrl}")
             .build()
 
  • Constructor Details

    • ProductRemoveImageActionBuilder

      public ProductRemoveImageActionBuilder()
  • Method Details

    • variantId

      public ProductRemoveImageActionBuilder 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
    • imageUrl

      public ProductRemoveImageActionBuilder imageUrl(String imageUrl)

      The URL of the image to remove.

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

      If true, only the staged image is removed. If false, both the current and staged image is removed.

      Parameters:
      staged - 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
    • getImageUrl

      public String getImageUrl()

      The URL of the image to remove.

      Returns:
      imageUrl
    • getStaged

      @Nullable public Boolean getStaged()

      If true, only the staged image is removed. If false, both the current and staged image is removed.

      Returns:
      staged
    • build

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

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

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

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