Class ProductChangeMasterVariantActionBuilder

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

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

     ProductChangeMasterVariantAction productChangeMasterVariantAction = ProductChangeMasterVariantAction.builder()
             .build()
 
  • Constructor Details

    • ProductChangeMasterVariantActionBuilder

      public ProductChangeMasterVariantActionBuilder()
  • Method Details

    • variantId

      public ProductChangeMasterVariantActionBuilder variantId(@Nullable Long variantId)

      The id of the ProductVariant to become the Master Variant.

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

      public ProductChangeMasterVariantActionBuilder sku(@Nullable String sku)

      The sku of the ProductVariant to become the Master Variant.

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

      public ProductChangeMasterVariantActionBuilder staged(@Nullable Boolean staged)

      If true, only the staged Master Variant is changed. If false, both the current and staged Master Variant are changed.

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

      @Nullable public Long getVariantId()

      The id of the ProductVariant to become the Master Variant.

      Returns:
      variantId
    • getSku

      @Nullable public String getSku()

      The sku of the ProductVariant to become the Master Variant.

      Returns:
      sku
    • getStaged

      @Nullable public Boolean getStaged()

      If true, only the staged Master Variant is changed. If false, both the current and staged Master Variant are changed.

      Returns:
      staged
    • build

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

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

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

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