001
002package com.commercetools.history.models.common;
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 * Variant
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class VariantImpl implements Variant, ModelBase {
022
023    private Integer id;
024
025    private String sku;
026
027    private String key;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    VariantImpl(@JsonProperty("id") final Integer id, @JsonProperty("sku") final String sku,
034            @JsonProperty("key") final String key) {
035        this.id = id;
036        this.sku = sku;
037        this.key = key;
038    }
039
040    /**
041     * create empty instance
042     */
043    public VariantImpl() {
044    }
045
046    /**
047     *
048     */
049
050    public Integer getId() {
051        return this.id;
052    }
053
054    /**
055     *
056     */
057
058    public String getSku() {
059        return this.sku;
060    }
061
062    /**
063     *
064     */
065
066    public String getKey() {
067        return this.key;
068    }
069
070    public void setId(final Integer id) {
071        this.id = id;
072    }
073
074    public void setSku(final String sku) {
075        this.sku = sku;
076    }
077
078    public void setKey(final String key) {
079        this.key = key;
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        VariantImpl that = (VariantImpl) o;
091
092        return new EqualsBuilder().append(id, that.id)
093                .append(sku, that.sku)
094                .append(key, that.key)
095                .append(id, that.id)
096                .append(sku, that.sku)
097                .append(key, that.key)
098                .isEquals();
099    }
100
101    @Override
102    public int hashCode() {
103        return new HashCodeBuilder(17, 37).append(id).append(sku).append(key).toHashCode();
104    }
105
106}