001
002package com.commercetools.ml.models.similar_products;
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 *  <p>Specify which ProductData attributes to use for estimating similarity and how to weigh them. An attribute's weight can be any whole positive integer, starting with 0. The larger the integer, the higher its weight.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class SimilarityMeasuresImpl implements SimilarityMeasures, ModelBase {
022
023    private Long name;
024
025    private Long description;
026
027    private Long attribute;
028
029    private Long variantCount;
030
031    private Long price;
032
033    /**
034     * create instance with all properties
035     */
036    @JsonCreator
037    SimilarityMeasuresImpl(@JsonProperty("name") final Long name, @JsonProperty("description") final Long description,
038            @JsonProperty("attribute") final Long attribute, @JsonProperty("variantCount") final Long variantCount,
039            @JsonProperty("price") final Long price) {
040        this.name = name;
041        this.description = description;
042        this.attribute = attribute;
043        this.variantCount = variantCount;
044        this.price = price;
045    }
046
047    /**
048     * create empty instance
049     */
050    public SimilarityMeasuresImpl() {
051    }
052
053    /**
054     *  <p>Importance of the <code>name</code> attribute in overall similarity.</p>
055     */
056
057    public Long getName() {
058        return this.name;
059    }
060
061    /**
062     *  <p>Importance of the <code>description</code> attribute in overall similarity.</p>
063     */
064
065    public Long getDescription() {
066        return this.description;
067    }
068
069    /**
070     *  <p>Importance of the <code>description</code> attribute in overall similarity.</p>
071     */
072
073    public Long getAttribute() {
074        return this.attribute;
075    }
076
077    /**
078     *  <p>Importance of the number of product variants in overall similarity.</p>
079     */
080
081    public Long getVariantCount() {
082        return this.variantCount;
083    }
084
085    /**
086     *  <p>Importance of the <code>price</code> attribute in overall similarity.</p>
087     */
088
089    public Long getPrice() {
090        return this.price;
091    }
092
093    public void setName(final Long name) {
094        this.name = name;
095    }
096
097    public void setDescription(final Long description) {
098        this.description = description;
099    }
100
101    public void setAttribute(final Long attribute) {
102        this.attribute = attribute;
103    }
104
105    public void setVariantCount(final Long variantCount) {
106        this.variantCount = variantCount;
107    }
108
109    public void setPrice(final Long price) {
110        this.price = price;
111    }
112
113    @Override
114    public boolean equals(Object o) {
115        if (this == o)
116            return true;
117
118        if (o == null || getClass() != o.getClass())
119            return false;
120
121        SimilarityMeasuresImpl that = (SimilarityMeasuresImpl) o;
122
123        return new EqualsBuilder().append(name, that.name)
124                .append(description, that.description)
125                .append(attribute, that.attribute)
126                .append(variantCount, that.variantCount)
127                .append(price, that.price)
128                .append(name, that.name)
129                .append(description, that.description)
130                .append(attribute, that.attribute)
131                .append(variantCount, that.variantCount)
132                .append(price, that.price)
133                .isEquals();
134    }
135
136    @Override
137    public int hashCode() {
138        return new HashCodeBuilder(17, 37).append(name)
139                .append(description)
140                .append(attribute)
141                .append(variantCount)
142                .append(price)
143                .toHashCode();
144    }
145
146}