001
002package com.commercetools.history.models.change;
003
004import java.time.*;
005import java.util.*;
006
007import com.commercetools.history.models.change_value.SetCartClassificationShippingRateInputValue;
008import com.commercetools.history.models.change_value.SetCartScoreShippingRateInputValue;
009import com.fasterxml.jackson.annotation.JsonCreator;
010import com.fasterxml.jackson.annotation.JsonIgnore;
011import com.fasterxml.jackson.annotation.JsonProperty;
012import com.fasterxml.jackson.databind.annotation.*;
013
014import io.vrap.rmf.base.client.ModelBase;
015import io.vrap.rmf.base.client.utils.Generated;
016
017import org.apache.commons.lang3.builder.EqualsBuilder;
018import org.apache.commons.lang3.builder.HashCodeBuilder;
019
020/**
021 *  <p>Change triggered by the Set Shipping Rate Input update action.</p>
022 */
023@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
024public class SetShippingRateInputChangeImpl implements SetShippingRateInputChange, ModelBase {
025
026    private String type;
027
028    private String change;
029
030    private java.lang.Object previousValue;
031
032    private java.lang.Object nextValue;
033
034    /**
035     * create instance with all properties
036     */
037    @JsonCreator
038    SetShippingRateInputChangeImpl(@JsonProperty("change") final String change,
039            @JsonProperty("previousValue") final java.lang.Object previousValue,
040            @JsonProperty("nextValue") final java.lang.Object nextValue) {
041        this.change = change;
042        this.previousValue = previousValue;
043        this.nextValue = nextValue;
044        this.type = SET_SHIPPING_RATE_INPUT_CHANGE;
045    }
046
047    /**
048     * create empty instance
049     */
050    public SetShippingRateInputChangeImpl() {
051        this.type = SET_SHIPPING_RATE_INPUT_CHANGE;
052    }
053
054    /**
055     *
056     */
057
058    public String getType() {
059        return this.type;
060    }
061
062    /**
063     *
064     */
065
066    public String getChange() {
067        return this.change;
068    }
069
070    /**
071     *  <p>Value before the change.</p>
072     */
073
074    public java.lang.Object getPreviousValue() {
075        return this.previousValue;
076    }
077
078    /**
079     *  <p>Value after the change.</p>
080     */
081
082    public java.lang.Object getNextValue() {
083        return this.nextValue;
084    }
085
086    public void setChange(final String change) {
087        this.change = change;
088    }
089
090    @JsonIgnore
091    public void setPreviousValue(final SetCartClassificationShippingRateInputValue previousValue) {
092        this.previousValue = previousValue;
093    }
094
095    @JsonIgnore
096    public void setPreviousValue(final SetCartScoreShippingRateInputValue previousValue) {
097        this.previousValue = previousValue;
098    }
099
100    public void setPreviousValue(final java.lang.Object previousValue) {
101        this.previousValue = previousValue;
102    }
103
104    @JsonIgnore
105    public void setNextValue(final SetCartClassificationShippingRateInputValue nextValue) {
106        this.nextValue = nextValue;
107    }
108
109    @JsonIgnore
110    public void setNextValue(final SetCartScoreShippingRateInputValue nextValue) {
111        this.nextValue = nextValue;
112    }
113
114    public void setNextValue(final java.lang.Object nextValue) {
115        this.nextValue = nextValue;
116    }
117
118    @Override
119    public boolean equals(Object o) {
120        if (this == o)
121            return true;
122
123        if (o == null || getClass() != o.getClass())
124            return false;
125
126        SetShippingRateInputChangeImpl that = (SetShippingRateInputChangeImpl) o;
127
128        return new EqualsBuilder().append(type, that.type)
129                .append(change, that.change)
130                .append(previousValue, that.previousValue)
131                .append(nextValue, that.nextValue)
132                .append(type, that.type)
133                .append(change, that.change)
134                .append(previousValue, that.previousValue)
135                .append(nextValue, that.nextValue)
136                .isEquals();
137    }
138
139    @Override
140    public int hashCode() {
141        return new HashCodeBuilder(17, 37).append(type)
142                .append(change)
143                .append(previousValue)
144                .append(nextValue)
145                .toHashCode();
146    }
147
148}