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>User-provided identifiers present on the resource for which the Message is created. The value of the identifier stored in the Message corresponds to the one that was set on the resource at the version shown in <code>resourceVersion</code>.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class UserProvidedIdentifiersImpl implements UserProvidedIdentifiers, ModelBase {
022
023    private String key;
024
025    private String externalId;
026
027    private String orderNumber;
028
029    private String customerNumber;
030
031    private String sku;
032
033    private com.commercetools.api.models.common.LocalizedString slug;
034
035    private com.commercetools.api.models.message.ContainerAndKey containerAndKey;
036
037    /**
038     * create instance with all properties
039     */
040    @JsonCreator
041    UserProvidedIdentifiersImpl(@JsonProperty("key") final String key,
042            @JsonProperty("externalId") final String externalId, @JsonProperty("orderNumber") final String orderNumber,
043            @JsonProperty("customerNumber") final String customerNumber, @JsonProperty("sku") final String sku,
044            @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug,
045            @JsonProperty("containerAndKey") final com.commercetools.api.models.message.ContainerAndKey containerAndKey) {
046        this.key = key;
047        this.externalId = externalId;
048        this.orderNumber = orderNumber;
049        this.customerNumber = customerNumber;
050        this.sku = sku;
051        this.slug = slug;
052        this.containerAndKey = containerAndKey;
053    }
054
055    /**
056     * create empty instance
057     */
058    public UserProvidedIdentifiersImpl() {
059    }
060
061    /**
062     *  <p>User-provided unique identifier of the resource.</p>
063     */
064
065    public String getKey() {
066        return this.key;
067    }
068
069    /**
070     *  <p>User-provided unique identifier of the resource.</p>
071     */
072
073    public String getExternalId() {
074        return this.externalId;
075    }
076
077    /**
078     *  <p>User-provided unique identifier of an Order.</p>
079     */
080
081    public String getOrderNumber() {
082        return this.orderNumber;
083    }
084
085    /**
086     *  <p>User-provided unique identifier of a Customer.</p>
087     */
088
089    public String getCustomerNumber() {
090        return this.customerNumber;
091    }
092
093    /**
094     *  <p>Unique SKU of a Product Variant.</p>
095     */
096
097    public String getSku() {
098        return this.sku;
099    }
100
101    /**
102     *  <p>Unique identifier usually used in deep-link URLs for a Product. The value corresponds to the slug in the <code>current</code> Product Projection.</p>
103     */
104
105    public com.commercetools.api.models.common.LocalizedString getSlug() {
106        return this.slug;
107    }
108
109    /**
110     *  <p>Unique identifier of a Custom Object.</p>
111     */
112
113    public com.commercetools.api.models.message.ContainerAndKey getContainerAndKey() {
114        return this.containerAndKey;
115    }
116
117    public void setKey(final String key) {
118        this.key = key;
119    }
120
121    public void setExternalId(final String externalId) {
122        this.externalId = externalId;
123    }
124
125    public void setOrderNumber(final String orderNumber) {
126        this.orderNumber = orderNumber;
127    }
128
129    public void setCustomerNumber(final String customerNumber) {
130        this.customerNumber = customerNumber;
131    }
132
133    public void setSku(final String sku) {
134        this.sku = sku;
135    }
136
137    public void setSlug(final com.commercetools.api.models.common.LocalizedString slug) {
138        this.slug = slug;
139    }
140
141    public void setContainerAndKey(final com.commercetools.api.models.message.ContainerAndKey containerAndKey) {
142        this.containerAndKey = containerAndKey;
143    }
144
145    @Override
146    public boolean equals(Object o) {
147        if (this == o)
148            return true;
149
150        if (o == null || getClass() != o.getClass())
151            return false;
152
153        UserProvidedIdentifiersImpl that = (UserProvidedIdentifiersImpl) o;
154
155        return new EqualsBuilder().append(key, that.key)
156                .append(externalId, that.externalId)
157                .append(orderNumber, that.orderNumber)
158                .append(customerNumber, that.customerNumber)
159                .append(sku, that.sku)
160                .append(slug, that.slug)
161                .append(containerAndKey, that.containerAndKey)
162                .isEquals();
163    }
164
165    @Override
166    public int hashCode() {
167        return new HashCodeBuilder(17, 37).append(key)
168                .append(externalId)
169                .append(orderNumber)
170                .append(customerNumber)
171                .append(sku)
172                .append(slug)
173                .append(containerAndKey)
174                .toHashCode();
175    }
176
177}