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 Change Customer update action.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class QuoteRequestCustomerChangedMessagePayloadImpl
022        implements QuoteRequestCustomerChangedMessagePayload, ModelBase {
023
024    private String type;
025
026    private com.commercetools.api.models.customer.CustomerReference customer;
027
028    private com.commercetools.api.models.customer.CustomerReference previousCustomer;
029
030    /**
031     * create instance with all properties
032     */
033    @JsonCreator
034    QuoteRequestCustomerChangedMessagePayloadImpl(
035            @JsonProperty("customer") final com.commercetools.api.models.customer.CustomerReference customer,
036            @JsonProperty("previousCustomer") final com.commercetools.api.models.customer.CustomerReference previousCustomer) {
037        this.customer = customer;
038        this.previousCustomer = previousCustomer;
039        this.type = QUOTE_REQUEST_CUSTOMER_CHANGED;
040    }
041
042    /**
043     * create empty instance
044     */
045    public QuoteRequestCustomerChangedMessagePayloadImpl() {
046        this.type = QUOTE_REQUEST_CUSTOMER_CHANGED;
047    }
048
049    /**
050     *
051     */
052
053    public String getType() {
054        return this.type;
055    }
056
057    /**
058     *  <p>The Buyer who now owns the Quote Request.</p>
059     */
060
061    public com.commercetools.api.models.customer.CustomerReference getCustomer() {
062        return this.customer;
063    }
064
065    /**
066     *  <p>The previous Buyer.</p>
067     */
068
069    public com.commercetools.api.models.customer.CustomerReference getPreviousCustomer() {
070        return this.previousCustomer;
071    }
072
073    public void setCustomer(final com.commercetools.api.models.customer.CustomerReference customer) {
074        this.customer = customer;
075    }
076
077    public void setPreviousCustomer(final com.commercetools.api.models.customer.CustomerReference previousCustomer) {
078        this.previousCustomer = previousCustomer;
079    }
080
081    @Override
082    public boolean equals(Object o) {
083        if (this == o)
084            return true;
085
086        if (o == null || getClass() != o.getClass())
087            return false;
088
089        QuoteRequestCustomerChangedMessagePayloadImpl that = (QuoteRequestCustomerChangedMessagePayloadImpl) o;
090
091        return new EqualsBuilder().append(type, that.type)
092                .append(customer, that.customer)
093                .append(previousCustomer, that.previousCustomer)
094                .isEquals();
095    }
096
097    @Override
098    public int hashCode() {
099        return new HashCodeBuilder(17, 37).append(type).append(customer).append(previousCustomer).toHashCode();
100    }
101
102}