Class SimilarProductBuilder

java.lang.Object
com.commercetools.ml.models.similar_products.SimilarProductBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<SimilarProduct>

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

     SimilarProduct similarProduct = SimilarProduct.builder()
             .build()
 
  • Constructor Details

    • SimilarProductBuilder

      public SimilarProductBuilder()
  • Method Details

    • product

      Reference to Product

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

      Reference to Product

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

      Reference to Product

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

      public SimilarProductBuilder variantId(@Nullable Long variantId)

      ID of the ProductVariant that was compared.

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

      Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

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

      Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

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

      Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

      Parameters:
      meta - value to be set
      Returns:
      Builder
    • getProduct

      @Nullable public ProductReference getProduct()

      Reference to Product

      Returns:
      product
    • getVariantId

      @Nullable public Long getVariantId()

      ID of the ProductVariant that was compared.

      Returns:
      variantId
    • getMeta

      @Nullable public SimilarProductMeta getMeta()

      Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

      Returns:
      meta
    • build

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

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

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

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