Interface SimilarProduct


public interface SimilarProduct

One part of a SimilarProductPair. Refers to a specific ProductVariant.


Example to create an instance using the builder pattern

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

    • getProduct

      @Valid @Valid ProductReference getProduct()

      Reference to Product

      Returns:
      product
    • getVariantId

      Long getVariantId()

      ID of the ProductVariant that was compared.

      Returns:
      variantId
    • getMeta

      @Valid @Valid 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
    • setProduct

      void setProduct(ProductReference product)

      Reference to Product

      Parameters:
      product - value to be set
    • setVariantId

      void setVariantId(Long variantId)

      ID of the ProductVariant that was compared.

      Parameters:
      variantId - value to be set
    • setMeta

      void setMeta(SimilarProductMeta 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
    • of

      static SimilarProduct of()
      factory method
      Returns:
      instance of SimilarProduct
    • of

      static SimilarProduct of(SimilarProduct template)
      factory method to create a shallow copy SimilarProduct
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static SimilarProduct deepCopy(@Nullable SimilarProduct template)
      factory method to create a deep copy of SimilarProduct
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static SimilarProductBuilder builder()
      builder factory method for SimilarProduct
      Returns:
      builder
    • builder

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

      default <T> T withSimilarProduct(Function<SimilarProduct,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<SimilarProduct> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference