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 * CustomerLabel
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class CustomerLabelImpl implements CustomerLabel, ModelBase {
022
023    private String type;
024
025    private String firstName;
026
027    private String lastName;
028
029    private String customerNumber;
030
031    /**
032     * create instance with all properties
033     */
034    @JsonCreator
035    CustomerLabelImpl(@JsonProperty("firstName") final String firstName,
036            @JsonProperty("lastName") final String lastName,
037            @JsonProperty("customerNumber") final String customerNumber) {
038        this.firstName = firstName;
039        this.lastName = lastName;
040        this.customerNumber = customerNumber;
041        this.type = CUSTOMER_LABEL;
042    }
043
044    /**
045     * create empty instance
046     */
047    public CustomerLabelImpl() {
048        this.type = CUSTOMER_LABEL;
049    }
050
051    /**
052     *
053     */
054
055    public String getType() {
056        return this.type;
057    }
058
059    /**
060     *  <p>Given name (first name) of the Customer.</p>
061     */
062
063    public String getFirstName() {
064        return this.firstName;
065    }
066
067    /**
068     *  <p>Family name (last name) of the Customer.</p>
069     */
070
071    public String getLastName() {
072        return this.lastName;
073    }
074
075    /**
076     *  <p>User-defined unique identifier of the Customer.</p>
077     */
078
079    public String getCustomerNumber() {
080        return this.customerNumber;
081    }
082
083    public void setFirstName(final String firstName) {
084        this.firstName = firstName;
085    }
086
087    public void setLastName(final String lastName) {
088        this.lastName = lastName;
089    }
090
091    public void setCustomerNumber(final String customerNumber) {
092        this.customerNumber = customerNumber;
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        CustomerLabelImpl that = (CustomerLabelImpl) o;
104
105        return new EqualsBuilder().append(type, that.type)
106                .append(firstName, that.firstName)
107                .append(lastName, that.lastName)
108                .append(customerNumber, that.customerNumber)
109                .append(type, that.type)
110                .append(firstName, that.firstName)
111                .append(lastName, that.lastName)
112                .append(customerNumber, that.customerNumber)
113                .isEquals();
114    }
115
116    @Override
117    public int hashCode() {
118        return new HashCodeBuilder(17, 37).append(type)
119                .append(firstName)
120                .append(lastName)
121                .append(customerNumber)
122                .toHashCode();
123    }
124
125}