Class ProductSetProductVariantKeyActionBuilder

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

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

     ProductSetProductVariantKeyAction productSetProductVariantKeyAction = ProductSetProductVariantKeyAction.builder()
             .build()
 
  • Constructor Details

    • ProductSetProductVariantKeyActionBuilder

      public ProductSetProductVariantKeyActionBuilder()
  • Method Details

    • variantId

      public ProductSetProductVariantKeyActionBuilder 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
    • key

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

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

      public ProductSetProductVariantKeyActionBuilder staged(@Nullable Boolean staged)

      If true, only the staged key is set. If false, both the current and staged key are set.

      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
    • getKey

      @Nullable public String getKey()

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

      Returns:
      key
    • getStaged

      @Nullable public Boolean getStaged()

      If true, only the staged key is set. If false, both the current and staged key are set.

      Returns:
      staged
    • build

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

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

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

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