001
002package com.commercetools.ml.models.general_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 * GeneralCategoryRecommendation
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class GeneralCategoryRecommendationImpl implements GeneralCategoryRecommendation, ModelBase {
022
023    private String categoryName;
024
025    private Double confidence;
026
027    @JsonCreator
028    GeneralCategoryRecommendationImpl(@JsonProperty("categoryName") final String categoryName,
029            @JsonProperty("confidence") final Double confidence) {
030        this.categoryName = categoryName;
031        this.confidence = confidence;
032    }
033
034    public GeneralCategoryRecommendationImpl() {
035    }
036
037    /**
038     *  <p>An English category name that is recommended for a product.</p>
039     */
040
041    public String getCategoryName() {
042        return this.categoryName;
043    }
044
045    /**
046     *  <p>Probability score for the category recommendation.</p>
047     */
048
049    public Double getConfidence() {
050        return this.confidence;
051    }
052
053    public void setCategoryName(final String categoryName) {
054        this.categoryName = categoryName;
055    }
056
057    public void setConfidence(final Double confidence) {
058        this.confidence = confidence;
059    }
060
061    @Override
062    public boolean equals(Object o) {
063        if (this == o)
064            return true;
065
066        if (o == null || getClass() != o.getClass())
067            return false;
068
069        GeneralCategoryRecommendationImpl that = (GeneralCategoryRecommendationImpl) o;
070
071        return new EqualsBuilder().append(categoryName, that.categoryName)
072                .append(confidence, that.confidence)
073                .isEquals();
074    }
075
076    @Override
077    public int hashCode() {
078        return new HashCodeBuilder(17, 37).append(categoryName).append(confidence).toHashCode();
079    }
080
081}