001
002package com.commercetools.history.models.change;
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>Change triggered by the Set DeleteDaysAfterLastModification update action.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class SetDeleteDaysAfterLastModificationChangeImpl
022        implements SetDeleteDaysAfterLastModificationChange, ModelBase {
023
024    private String type;
025
026    private String change;
027
028    private Integer previousValue;
029
030    private Integer nextValue;
031
032    /**
033     * create instance with all properties
034     */
035    @JsonCreator
036    SetDeleteDaysAfterLastModificationChangeImpl(@JsonProperty("change") final String change,
037            @JsonProperty("previousValue") final Integer previousValue,
038            @JsonProperty("nextValue") final Integer nextValue) {
039        this.change = change;
040        this.previousValue = previousValue;
041        this.nextValue = nextValue;
042        this.type = SET_DELETE_DAYS_AFTER_LAST_MODIFICATION_CHANGE;
043    }
044
045    /**
046     * create empty instance
047     */
048    public SetDeleteDaysAfterLastModificationChangeImpl() {
049        this.type = SET_DELETE_DAYS_AFTER_LAST_MODIFICATION_CHANGE;
050    }
051
052    /**
053     *
054     */
055
056    public String getType() {
057        return this.type;
058    }
059
060    /**
061     *
062     */
063
064    public String getChange() {
065        return this.change;
066    }
067
068    /**
069     *  <p>Value before the change.</p>
070     */
071
072    public Integer getPreviousValue() {
073        return this.previousValue;
074    }
075
076    /**
077     *  <p>Value after the change.</p>
078     */
079
080    public Integer getNextValue() {
081        return this.nextValue;
082    }
083
084    public void setChange(final String change) {
085        this.change = change;
086    }
087
088    public void setPreviousValue(final Integer previousValue) {
089        this.previousValue = previousValue;
090    }
091
092    public void setNextValue(final Integer nextValue) {
093        this.nextValue = nextValue;
094    }
095
096    @Override
097    public boolean equals(Object o) {
098        if (this == o)
099            return true;
100
101        if (o == null || getClass() != o.getClass())
102            return false;
103
104        SetDeleteDaysAfterLastModificationChangeImpl that = (SetDeleteDaysAfterLastModificationChangeImpl) o;
105
106        return new EqualsBuilder().append(type, that.type)
107                .append(change, that.change)
108                .append(previousValue, that.previousValue)
109                .append(nextValue, that.nextValue)
110                .append(type, that.type)
111                .append(change, that.change)
112                .append(previousValue, that.previousValue)
113                .append(nextValue, that.nextValue)
114                .isEquals();
115    }
116
117    @Override
118    public int hashCode() {
119        return new HashCodeBuilder(17, 37).append(type)
120                .append(change)
121                .append(previousValue)
122                .append(nextValue)
123                .toHashCode();
124    }
125
126}