001
002package com.commercetools.history.models.label;
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 * StagedQuoteLabel
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class StagedQuoteLabelImpl implements StagedQuoteLabel, ModelBase {
022
023    private String type;
024
025    private String key;
026
027    private com.commercetools.history.models.common.Reference customer;
028
029    private com.commercetools.history.models.common.Reference quoteRequest;
030
031    /**
032     * create instance with all properties
033     */
034    @JsonCreator
035    StagedQuoteLabelImpl(@JsonProperty("key") final String key,
036            @JsonProperty("customer") final com.commercetools.history.models.common.Reference customer,
037            @JsonProperty("quoteRequest") final com.commercetools.history.models.common.Reference quoteRequest) {
038        this.key = key;
039        this.customer = customer;
040        this.quoteRequest = quoteRequest;
041        this.type = STAGED_QUOTE_LABEL;
042    }
043
044    /**
045     * create empty instance
046     */
047    public StagedQuoteLabelImpl() {
048        this.type = STAGED_QUOTE_LABEL;
049    }
050
051    /**
052     *
053     */
054
055    public String getType() {
056        return this.type;
057    }
058
059    /**
060     *  <p>User-defined unique identifier of the Staged Quote.</p>
061     */
062
063    public String getKey() {
064        return this.key;
065    }
066
067    /**
068     *  <p>The Buyer who requested the Quote.</p>
069     */
070
071    public com.commercetools.history.models.common.Reference getCustomer() {
072        return this.customer;
073    }
074
075    /**
076     *  <p>Quote Request related to the Staged Quote.</p>
077     */
078
079    public com.commercetools.history.models.common.Reference getQuoteRequest() {
080        return this.quoteRequest;
081    }
082
083    public void setKey(final String key) {
084        this.key = key;
085    }
086
087    public void setCustomer(final com.commercetools.history.models.common.Reference customer) {
088        this.customer = customer;
089    }
090
091    public void setQuoteRequest(final com.commercetools.history.models.common.Reference quoteRequest) {
092        this.quoteRequest = quoteRequest;
093    }
094
095    @Override
096    public boolean equals(Object o) {
097        if (this == o)
098            return true;
099
100        if (o == null || getClass() != o.getClass())
101            return false;
102
103        StagedQuoteLabelImpl that = (StagedQuoteLabelImpl) o;
104
105        return new EqualsBuilder().append(type, that.type)
106                .append(key, that.key)
107                .append(customer, that.customer)
108                .append(quoteRequest, that.quoteRequest)
109                .append(type, that.type)
110                .append(key, that.key)
111                .append(customer, that.customer)
112                .append(quoteRequest, that.quoteRequest)
113                .isEquals();
114    }
115
116    @Override
117    public int hashCode() {
118        return new HashCodeBuilder(17, 37).append(type).append(key).append(customer).append(quoteRequest).toHashCode();
119    }
120
121}