Class ProductRemoveVariantActionBuilder

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

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

     ProductRemoveVariantAction productRemoveVariantAction = ProductRemoveVariantAction.builder()
             .build()
 
  • Constructor Details

    • ProductRemoveVariantActionBuilder

      public ProductRemoveVariantActionBuilder()
  • Method Details

    • id

      public ProductRemoveVariantActionBuilder id(@Nullable Long id)

      The id of the ProductVariant to remove.

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

      public ProductRemoveVariantActionBuilder sku(@Nullable String sku)

      The sku of the ProductVariant to remove.

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

      public ProductRemoveVariantActionBuilder staged(@Nullable Boolean staged)

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

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

      @Nullable public Long getId()

      The id of the ProductVariant to remove.

      Returns:
      id
    • getSku

      @Nullable public String getSku()

      The sku of the ProductVariant to remove.

      Returns:
      sku
    • getStaged

      @Nullable public Boolean getStaged()

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

      Returns:
      staged
    • build

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

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

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

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