Class ProductVariantTailoringBuilder

java.lang.Object
com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder
All Implemented Interfaces:
Builder<ProductVariantTailoring>

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

     ProductVariantTailoring productVariantTailoring = ProductVariantTailoring.builder()
             .id(0.3)
             .build()
 
  • Constructor Details

    • ProductVariantTailoringBuilder

      public ProductVariantTailoringBuilder()
  • Method Details

    • id

      The id of the tailored ProductVariant.

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

      public ProductVariantTailoringBuilder images(@Nullable Image... images)

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

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

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Parameters:
      images - value to be set
      Returns:
      Builder
    • plusImages

      public ProductVariantTailoringBuilder plusImages(@Nullable Image... images)

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Parameters:
      images - value to be set
      Returns:
      Builder
    • plusImages

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the images value
      Returns:
      Builder
    • withImages

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the images value
      Returns:
      Builder
    • addImages

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the images value
      Returns:
      Builder
    • setImages

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the images value
      Returns:
      Builder
    • assets

      public ProductVariantTailoringBuilder assets(@Nullable Asset... assets)

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

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

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Parameters:
      assets - value to be set
      Returns:
      Builder
    • plusAssets

      public ProductVariantTailoringBuilder plusAssets(@Nullable Asset... assets)

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Parameters:
      assets - value to be set
      Returns:
      Builder
    • plusAssets

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the assets value
      Returns:
      Builder
    • withAssets

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the assets value
      Returns:
      Builder
    • addAssets

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the assets value
      Returns:
      Builder
    • setAssets

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Parameters:
      builder - function to build the assets value
      Returns:
      Builder
    • attributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      attributes - value to be set
      Returns:
      Builder
    • attributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      attributes - value to be set
      Returns:
      Builder
    • plusAttributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      attributes - value to be set
      Returns:
      Builder
    • plusAttributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      builder - function to build the attributes value
      Returns:
      Builder
    • withAttributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      builder - function to build the attributes value
      Returns:
      Builder
    • addAttributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      builder - function to build the attributes value
      Returns:
      Builder
    • setAttributes

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Parameters:
      builder - function to build the attributes value
      Returns:
      Builder
    • getId

      public Long getId()

      The id of the tailored ProductVariant.

      Returns:
      id
    • getImages

      @Nullable public List<Image> getImages()

      Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

      Returns:
      images
    • getAssets

      @Nullable public List<Asset> getAssets()

      Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

      Returns:
      assets
    • getAttributes

      @Nullable public List<ProductTailoringAttribute> getAttributes()

      Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

      • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
      • otherwise the Attribute and its value are added to the ProductVariant.
      Returns:
      attributes
    • build

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

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

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

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