001
002package com.commercetools.api.models.message;
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>Generated after a successful Set Valid From update action.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class StandalonePriceValidFromSetMessageImpl implements StandalonePriceValidFromSetMessage, ModelBase {
022
023    private String id;
024
025    private Long version;
026
027    private java.time.ZonedDateTime createdAt;
028
029    private java.time.ZonedDateTime lastModifiedAt;
030
031    private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy;
032
033    private com.commercetools.api.models.common.CreatedBy createdBy;
034
035    private Long sequenceNumber;
036
037    private com.commercetools.api.models.common.Reference resource;
038
039    private Long resourceVersion;
040
041    private String type;
042
043    private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers;
044
045    private java.time.ZonedDateTime validFrom;
046
047    private java.time.ZonedDateTime previousValidFrom;
048
049    /**
050     * create instance with all properties
051     */
052    @JsonCreator
053    StandalonePriceValidFromSetMessageImpl(@JsonProperty("id") final String id,
054            @JsonProperty("version") final Long version,
055            @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt,
056            @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt,
057            @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy,
058            @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy,
059            @JsonProperty("sequenceNumber") final Long sequenceNumber,
060            @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource,
061            @JsonProperty("resourceVersion") final Long resourceVersion,
062            @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers,
063            @JsonProperty("validFrom") final java.time.ZonedDateTime validFrom,
064            @JsonProperty("previousValidFrom") final java.time.ZonedDateTime previousValidFrom) {
065        this.id = id;
066        this.version = version;
067        this.createdAt = createdAt;
068        this.lastModifiedAt = lastModifiedAt;
069        this.lastModifiedBy = lastModifiedBy;
070        this.createdBy = createdBy;
071        this.sequenceNumber = sequenceNumber;
072        this.resource = resource;
073        this.resourceVersion = resourceVersion;
074        this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers;
075        this.validFrom = validFrom;
076        this.previousValidFrom = previousValidFrom;
077        this.type = STANDALONE_PRICE_VALID_FROM_SET;
078    }
079
080    /**
081     * create empty instance
082     */
083    public StandalonePriceValidFromSetMessageImpl() {
084        this.type = STANDALONE_PRICE_VALID_FROM_SET;
085    }
086
087    /**
088     *  <p>Unique identifier of the Message. Can be used to track which Messages have been processed.</p>
089     */
090
091    public String getId() {
092        return this.id;
093    }
094
095    /**
096     *  <p>Version of a resource. In case of Messages, this is always <code>1</code>.</p>
097     */
098
099    public Long getVersion() {
100        return this.version;
101    }
102
103    /**
104     *  <p>Date and time (UTC) the Message was generated.</p>
105     */
106
107    public java.time.ZonedDateTime getCreatedAt() {
108        return this.createdAt;
109    }
110
111    /**
112     *  <p>Value of <code>createdAt</code>.</p>
113     */
114
115    public java.time.ZonedDateTime getLastModifiedAt() {
116        return this.lastModifiedAt;
117    }
118
119    /**
120     *  <p>Value of <code>createdBy</code>.</p>
121     */
122
123    public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() {
124        return this.lastModifiedBy;
125    }
126
127    /**
128     *  <p>Present on resources created after 1 February 2019 except for events not tracked.</p>
129     */
130
131    public com.commercetools.api.models.common.CreatedBy getCreatedBy() {
132        return this.createdBy;
133    }
134
135    /**
136     *  <p>Message number in relation to other Messages for a given resource. The <code>sequenceNumber</code> of the next Message for the resource is the successor of the <code>sequenceNumber</code> of the current Message. Meaning, the <code>sequenceNumber</code> of the next Message equals the <code>sequenceNumber</code> of the current Message + 1. <code>sequenceNumber</code> can be used to ensure that Messages are processed in the correct order for a particular resource.</p>
137     */
138
139    public Long getSequenceNumber() {
140        return this.sequenceNumber;
141    }
142
143    /**
144     *  <p>Reference to the resource on which the change or action was performed.</p>
145     */
146
147    public com.commercetools.api.models.common.Reference getResource() {
148        return this.resource;
149    }
150
151    /**
152     *  <p>Version of the resource on which the change or action was performed.</p>
153     */
154
155    public Long getResourceVersion() {
156        return this.resourceVersion;
157    }
158
159    /**
160     *  <p>Message Type of the Message.</p>
161     */
162
163    public String getType() {
164        return this.type;
165    }
166
167    /**
168     *  <p>User-provided identifiers of the resource, such as <code>key</code> or <code>externalId</code>. Only present if the resource has such identifiers.</p>
169     */
170
171    public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() {
172        return this.resourceUserProvidedIdentifiers;
173    }
174
175    /**
176     *  <p>Value of StandalonePrice <code>validFrom</code> after the Set Valid From update action.</p>
177     */
178
179    public java.time.ZonedDateTime getValidFrom() {
180        return this.validFrom;
181    }
182
183    /**
184     *  <p>Value of StandalonePrice <code>validFrom</code> before the Set Valid From update action.</p>
185     */
186
187    public java.time.ZonedDateTime getPreviousValidFrom() {
188        return this.previousValidFrom;
189    }
190
191    public void setId(final String id) {
192        this.id = id;
193    }
194
195    public void setVersion(final Long version) {
196        this.version = version;
197    }
198
199    public void setCreatedAt(final java.time.ZonedDateTime createdAt) {
200        this.createdAt = createdAt;
201    }
202
203    public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) {
204        this.lastModifiedAt = lastModifiedAt;
205    }
206
207    public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) {
208        this.lastModifiedBy = lastModifiedBy;
209    }
210
211    public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) {
212        this.createdBy = createdBy;
213    }
214
215    public void setSequenceNumber(final Long sequenceNumber) {
216        this.sequenceNumber = sequenceNumber;
217    }
218
219    public void setResource(final com.commercetools.api.models.common.Reference resource) {
220        this.resource = resource;
221    }
222
223    public void setResourceVersion(final Long resourceVersion) {
224        this.resourceVersion = resourceVersion;
225    }
226
227    public void setResourceUserProvidedIdentifiers(
228            final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) {
229        this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers;
230    }
231
232    public void setValidFrom(final java.time.ZonedDateTime validFrom) {
233        this.validFrom = validFrom;
234    }
235
236    public void setPreviousValidFrom(final java.time.ZonedDateTime previousValidFrom) {
237        this.previousValidFrom = previousValidFrom;
238    }
239
240    @Override
241    public boolean equals(Object o) {
242        if (this == o)
243            return true;
244
245        if (o == null || getClass() != o.getClass())
246            return false;
247
248        StandalonePriceValidFromSetMessageImpl that = (StandalonePriceValidFromSetMessageImpl) o;
249
250        return new EqualsBuilder().append(id, that.id)
251                .append(version, that.version)
252                .append(createdAt, that.createdAt)
253                .append(lastModifiedAt, that.lastModifiedAt)
254                .append(lastModifiedBy, that.lastModifiedBy)
255                .append(createdBy, that.createdBy)
256                .append(sequenceNumber, that.sequenceNumber)
257                .append(resource, that.resource)
258                .append(resourceVersion, that.resourceVersion)
259                .append(type, that.type)
260                .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers)
261                .append(validFrom, that.validFrom)
262                .append(previousValidFrom, that.previousValidFrom)
263                .isEquals();
264    }
265
266    @Override
267    public int hashCode() {
268        return new HashCodeBuilder(17, 37).append(id)
269                .append(version)
270                .append(createdAt)
271                .append(lastModifiedAt)
272                .append(lastModifiedBy)
273                .append(createdBy)
274                .append(sequenceNumber)
275                .append(resource)
276                .append(resourceVersion)
277                .append(type)
278                .append(resourceUserProvidedIdentifiers)
279                .append(validFrom)
280                .append(previousValidFrom)
281                .toHashCode();
282    }
283
284}