Class ProjectCategoryRecommendationBuilder

java.lang.Object
com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProjectCategoryRecommendation>

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

     ProjectCategoryRecommendation projectCategoryRecommendation = ProjectCategoryRecommendation.builder()
             .category(categoryBuilder -> categoryBuilder)
             .confidence(0.3)
             .path("{path}")
             .build()
 
  • Constructor Details

    • ProjectCategoryRecommendationBuilder

      public ProjectCategoryRecommendationBuilder()
  • Method Details

    • category

      A category that is recommended for a product.

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

      A category that is recommended for a product.

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

      A category that is recommended for a product.

      Parameters:
      category - value to be set
      Returns:
      Builder
    • confidence

      public ProjectCategoryRecommendationBuilder confidence(Double confidence)

      Probability score for the category recommendation.

      Parameters:
      confidence - value to be set
      Returns:
      Builder
    • path

      Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

      Parameters:
      path - value to be set
      Returns:
      Builder
    • getCategory

      public CategoryReference getCategory()

      A category that is recommended for a product.

      Returns:
      category
    • getConfidence

      public Double getConfidence()

      Probability score for the category recommendation.

      Returns:
      confidence
    • getPath

      public String getPath()

      Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

      Returns:
      path
    • build

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

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

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

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