Class ProductCatalogDataBuilder

java.lang.Object
com.commercetools.api.models.product.ProductCatalogDataBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProductCatalogData>

public class ProductCatalogDataBuilder extends Object implements io.vrap.rmf.base.client.Builder<ProductCatalogData>
ProductCatalogDataBuilder
Example to create an instance using the builder pattern

     ProductCatalogData productCatalogData = ProductCatalogData.builder()
             .published(true)
             .current(currentBuilder -> currentBuilder)
             .staged(stagedBuilder -> stagedBuilder)
             .hasStagedChanges(true)
             .build()
 
  • Constructor Details

    • ProductCatalogDataBuilder

      public ProductCatalogDataBuilder()
  • Method Details

    • published

      public ProductCatalogDataBuilder published(Boolean published)

      true if the Product is published.

      Parameters:
      published - value to be set
      Returns:
      Builder
    • current

      Current (published) data of the Product.

      Parameters:
      builder - function to build the current value
      Returns:
      Builder
    • withCurrent

      Current (published) data of the Product.

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

      public ProductCatalogDataBuilder current(ProductData current)

      Current (published) data of the Product.

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

      Staged (unpublished) data of the Product.

      Parameters:
      builder - function to build the staged value
      Returns:
      Builder
    • withStaged

      Staged (unpublished) data of the Product.

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

      public ProductCatalogDataBuilder staged(ProductData staged)

      Staged (unpublished) data of the Product.

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

      public ProductCatalogDataBuilder hasStagedChanges(Boolean hasStagedChanges)

      true if the staged data is different from the current data.

      Parameters:
      hasStagedChanges - value to be set
      Returns:
      Builder
    • getPublished

      public Boolean getPublished()

      true if the Product is published.

      Returns:
      published
    • getCurrent

      public ProductData getCurrent()

      Current (published) data of the Product.

      Returns:
      current
    • getStaged

      public ProductData getStaged()

      Staged (unpublished) data of the Product.

      Returns:
      staged
    • getHasStagedChanges

      public Boolean getHasStagedChanges()

      true if the staged data is different from the current data.

      Returns:
      hasStagedChanges
    • build

      public ProductCatalogData build()
      builds ProductCatalogData with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ProductCatalogData>
      Returns:
      ProductCatalogData
    • buildUnchecked

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

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

      public static ProductCatalogDataBuilder of(ProductCatalogData template)
      create builder for ProductCatalogData instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder