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 Parcel Measurements update action.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class ParcelMeasurementsUpdatedMessagePayloadImpl implements ParcelMeasurementsUpdatedMessagePayload, ModelBase {
022
023    private String type;
024
025    private String deliveryId;
026
027    private String parcelId;
028
029    private com.commercetools.api.models.order.ParcelMeasurements measurements;
030
031    private String shippingKey;
032
033    /**
034     * create instance with all properties
035     */
036    @JsonCreator
037    ParcelMeasurementsUpdatedMessagePayloadImpl(@JsonProperty("deliveryId") final String deliveryId,
038            @JsonProperty("parcelId") final String parcelId,
039            @JsonProperty("measurements") final com.commercetools.api.models.order.ParcelMeasurements measurements,
040            @JsonProperty("shippingKey") final String shippingKey) {
041        this.deliveryId = deliveryId;
042        this.parcelId = parcelId;
043        this.measurements = measurements;
044        this.shippingKey = shippingKey;
045        this.type = PARCEL_MEASUREMENTS_UPDATED;
046    }
047
048    /**
049     * create empty instance
050     */
051    public ParcelMeasurementsUpdatedMessagePayloadImpl() {
052        this.type = PARCEL_MEASUREMENTS_UPDATED;
053    }
054
055    /**
056     *
057     */
058
059    public String getType() {
060        return this.type;
061    }
062
063    /**
064     *  <p>Unique identifier of the Delivery.</p>
065     */
066
067    public String getDeliveryId() {
068        return this.deliveryId;
069    }
070
071    /**
072     *  <p>Unique identifier of the Parcel.</p>
073     */
074
075    public String getParcelId() {
076        return this.parcelId;
077    }
078
079    /**
080     *  <p>The Parcel Measurements that were set on the Parcel.</p>
081     */
082
083    public com.commercetools.api.models.order.ParcelMeasurements getMeasurements() {
084        return this.measurements;
085    }
086
087    /**
088     *  <p>User-defined unique identifier of the Shipping Method in a Cart with <code>Multiple</code> ShippingMode.</p>
089     */
090
091    public String getShippingKey() {
092        return this.shippingKey;
093    }
094
095    public void setDeliveryId(final String deliveryId) {
096        this.deliveryId = deliveryId;
097    }
098
099    public void setParcelId(final String parcelId) {
100        this.parcelId = parcelId;
101    }
102
103    public void setMeasurements(final com.commercetools.api.models.order.ParcelMeasurements measurements) {
104        this.measurements = measurements;
105    }
106
107    public void setShippingKey(final String shippingKey) {
108        this.shippingKey = shippingKey;
109    }
110
111    @Override
112    public boolean equals(Object o) {
113        if (this == o)
114            return true;
115
116        if (o == null || getClass() != o.getClass())
117            return false;
118
119        ParcelMeasurementsUpdatedMessagePayloadImpl that = (ParcelMeasurementsUpdatedMessagePayloadImpl) o;
120
121        return new EqualsBuilder().append(type, that.type)
122                .append(deliveryId, that.deliveryId)
123                .append(parcelId, that.parcelId)
124                .append(measurements, that.measurements)
125                .append(shippingKey, that.shippingKey)
126                .append(type, that.type)
127                .append(deliveryId, that.deliveryId)
128                .append(parcelId, that.parcelId)
129                .append(measurements, that.measurements)
130                .append(shippingKey, that.shippingKey)
131                .isEquals();
132    }
133
134    @Override
135    public int hashCode() {
136        return new HashCodeBuilder(17, 37).append(type)
137                .append(deliveryId)
138                .append(parcelId)
139                .append(measurements)
140                .append(shippingKey)
141                .toHashCode();
142    }
143
144}