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 * QuoteLabel
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class QuoteLabelImpl implements QuoteLabel, 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 stagedQuote;
030
031    private com.commercetools.history.models.common.Reference quoteRequest;
032
033    /**
034     * create instance with all properties
035     */
036    @JsonCreator
037    QuoteLabelImpl(@JsonProperty("key") final String key,
038            @JsonProperty("customer") final com.commercetools.history.models.common.Reference customer,
039            @JsonProperty("stagedQuote") final com.commercetools.history.models.common.Reference stagedQuote,
040            @JsonProperty("quoteRequest") final com.commercetools.history.models.common.Reference quoteRequest) {
041        this.key = key;
042        this.customer = customer;
043        this.stagedQuote = stagedQuote;
044        this.quoteRequest = quoteRequest;
045        this.type = QUOTE_LABEL;
046    }
047
048    /**
049     * create empty instance
050     */
051    public QuoteLabelImpl() {
052        this.type = QUOTE_LABEL;
053    }
054
055    /**
056     *
057     */
058
059    public String getType() {
060        return this.type;
061    }
062
063    /**
064     *  <p>User-defined unique identifier of the Quote.</p>
065     */
066
067    public String getKey() {
068        return this.key;
069    }
070
071    /**
072     *  <p>The Buyer who requested the Quote.</p>
073     */
074
075    public com.commercetools.history.models.common.Reference getCustomer() {
076        return this.customer;
077    }
078
079    /**
080     *  <p>Staged Quote related to the Quote.</p>
081     */
082
083    public com.commercetools.history.models.common.Reference getStagedQuote() {
084        return this.stagedQuote;
085    }
086
087    /**
088     *  <p>Quote Request related to the Quote.</p>
089     */
090
091    public com.commercetools.history.models.common.Reference getQuoteRequest() {
092        return this.quoteRequest;
093    }
094
095    public void setKey(final String key) {
096        this.key = key;
097    }
098
099    public void setCustomer(final com.commercetools.history.models.common.Reference customer) {
100        this.customer = customer;
101    }
102
103    public void setStagedQuote(final com.commercetools.history.models.common.Reference stagedQuote) {
104        this.stagedQuote = stagedQuote;
105    }
106
107    public void setQuoteRequest(final com.commercetools.history.models.common.Reference quoteRequest) {
108        this.quoteRequest = quoteRequest;
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        QuoteLabelImpl that = (QuoteLabelImpl) o;
120
121        return new EqualsBuilder().append(type, that.type)
122                .append(key, that.key)
123                .append(customer, that.customer)
124                .append(stagedQuote, that.stagedQuote)
125                .append(quoteRequest, that.quoteRequest)
126                .append(type, that.type)
127                .append(key, that.key)
128                .append(customer, that.customer)
129                .append(stagedQuote, that.stagedQuote)
130                .append(quoteRequest, that.quoteRequest)
131                .isEquals();
132    }
133
134    @Override
135    public int hashCode() {
136        return new HashCodeBuilder(17, 37).append(type)
137                .append(key)
138                .append(customer)
139                .append(stagedQuote)
140                .append(quoteRequest)
141                .toHashCode();
142    }
143
144}