001
002package com.commercetools.history.models.change_value;
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 * SetCartClassificationShippingRateInputValue
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class SetCartClassificationShippingRateInputValueImpl
022        implements SetCartClassificationShippingRateInputValue, ModelBase {
023
024    private String type;
025
026    private String key;
027
028    private com.commercetools.history.models.common.LocalizedString label;
029
030    /**
031     * create instance with all properties
032     */
033    @JsonCreator
034    SetCartClassificationShippingRateInputValueImpl(@JsonProperty("type") final String type,
035            @JsonProperty("key") final String key,
036            @JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label) {
037        this.type = type;
038        this.key = key;
039        this.label = label;
040    }
041
042    /**
043     * create empty instance
044     */
045    public SetCartClassificationShippingRateInputValueImpl() {
046    }
047
048    /**
049     *
050     */
051
052    public String getType() {
053        return this.type;
054    }
055
056    /**
057     *  <p>Key of the value used as a programmatic identifier.</p>
058     */
059
060    public String getKey() {
061        return this.key;
062    }
063
064    /**
065     *  <p>Descriptive localized label of the value.</p>
066     */
067
068    public com.commercetools.history.models.common.LocalizedString getLabel() {
069        return this.label;
070    }
071
072    public void setType(final String type) {
073        this.type = type;
074    }
075
076    public void setKey(final String key) {
077        this.key = key;
078    }
079
080    public void setLabel(final com.commercetools.history.models.common.LocalizedString label) {
081        this.label = label;
082    }
083
084    @Override
085    public boolean equals(Object o) {
086        if (this == o)
087            return true;
088
089        if (o == null || getClass() != o.getClass())
090            return false;
091
092        SetCartClassificationShippingRateInputValueImpl that = (SetCartClassificationShippingRateInputValueImpl) o;
093
094        return new EqualsBuilder().append(type, that.type)
095                .append(key, that.key)
096                .append(label, that.label)
097                .append(type, that.type)
098                .append(key, that.key)
099                .append(label, that.label)
100                .isEquals();
101    }
102
103    @Override
104    public int hashCode() {
105        return new HashCodeBuilder(17, 37).append(type).append(key).append(label).toHashCode();
106    }
107
108}