001
002package com.commercetools.api.models.product;
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 * FacetTerm
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class FacetTermImpl implements FacetTerm, ModelBase {
022
023    private java.lang.Object term;
024
025    private Long count;
026
027    private Long productCount;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    FacetTermImpl(@JsonProperty("term") final java.lang.Object term, @JsonProperty("count") final Long count,
034            @JsonProperty("productCount") final Long productCount) {
035        this.term = term;
036        this.count = count;
037        this.productCount = productCount;
038    }
039
040    /**
041     * create empty instance
042     */
043    public FacetTermImpl() {
044    }
045
046    /**
047     *
048     */
049
050    public java.lang.Object getTerm() {
051        return this.term;
052    }
053
054    /**
055     *
056     */
057
058    public Long getCount() {
059        return this.count;
060    }
061
062    /**
063     *
064     */
065
066    public Long getProductCount() {
067        return this.productCount;
068    }
069
070    public void setTerm(final java.lang.Object term) {
071        this.term = term;
072    }
073
074    public void setCount(final Long count) {
075        this.count = count;
076    }
077
078    public void setProductCount(final Long productCount) {
079        this.productCount = productCount;
080    }
081
082    @Override
083    public boolean equals(Object o) {
084        if (this == o)
085            return true;
086
087        if (o == null || getClass() != o.getClass())
088            return false;
089
090        FacetTermImpl that = (FacetTermImpl) o;
091
092        return new EqualsBuilder().append(term, that.term)
093                .append(count, that.count)
094                .append(productCount, that.productCount)
095                .isEquals();
096    }
097
098    @Override
099    public int hashCode() {
100        return new HashCodeBuilder(17, 37).append(term).append(count).append(productCount).toHashCode();
101    }
102
103}