001 002package com.commercetools.ml.models.category_recommendations; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * ProjectCategoryRecommendation 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ProjectCategoryRecommendationImpl implements ProjectCategoryRecommendation, ModelBase { 022 023 private com.commercetools.ml.models.common.CategoryReference category; 024 025 private Double confidence; 026 027 private String path; 028 029 @JsonCreator 030 ProjectCategoryRecommendationImpl( 031 @JsonProperty("category") final com.commercetools.ml.models.common.CategoryReference category, 032 @JsonProperty("confidence") final Double confidence, @JsonProperty("path") final String path) { 033 this.category = category; 034 this.confidence = confidence; 035 this.path = path; 036 } 037 038 public ProjectCategoryRecommendationImpl() { 039 } 040 041 /** 042 * <p>A category that is recommended for a product.</p> 043 */ 044 045 public com.commercetools.ml.models.common.CategoryReference getCategory() { 046 return this.category; 047 } 048 049 /** 050 * <p>Probability score for the category recommendation.</p> 051 */ 052 053 public Double getConfidence() { 054 return this.confidence; 055 } 056 057 /** 058 * <p>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.</p> 059 */ 060 061 public String getPath() { 062 return this.path; 063 } 064 065 public void setCategory(final com.commercetools.ml.models.common.CategoryReference category) { 066 this.category = category; 067 } 068 069 public void setConfidence(final Double confidence) { 070 this.confidence = confidence; 071 } 072 073 public void setPath(final String path) { 074 this.path = path; 075 } 076 077 @Override 078 public boolean equals(Object o) { 079 if (this == o) 080 return true; 081 082 if (o == null || getClass() != o.getClass()) 083 return false; 084 085 ProjectCategoryRecommendationImpl that = (ProjectCategoryRecommendationImpl) o; 086 087 return new EqualsBuilder().append(category, that.category) 088 .append(confidence, that.confidence) 089 .append(path, that.path) 090 .isEquals(); 091 } 092 093 @Override 094 public int hashCode() { 095 return new HashCodeBuilder(17, 37).append(category).append(confidence).append(path).toHashCode(); 096 } 097 098}