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 * BusinessUnitLabel
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class BusinessUnitLabelImpl implements BusinessUnitLabel, ModelBase {
022
023    private String type;
024
025    private String key;
026
027    private String name;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    BusinessUnitLabelImpl(@JsonProperty("key") final String key, @JsonProperty("name") final String name) {
034        this.key = key;
035        this.name = name;
036        this.type = BUSINESS_UNIT_LABEL;
037    }
038
039    /**
040     * create empty instance
041     */
042    public BusinessUnitLabelImpl() {
043        this.type = BUSINESS_UNIT_LABEL;
044    }
045
046    /**
047     *
048     */
049
050    public String getType() {
051        return this.type;
052    }
053
054    /**
055     *  <p>User-defined unique identifier of the Business Unit.</p>
056     */
057
058    public String getKey() {
059        return this.key;
060    }
061
062    /**
063     *  <p>Name of the Business Unit.</p>
064     */
065
066    public String getName() {
067        return this.name;
068    }
069
070    public void setKey(final String key) {
071        this.key = key;
072    }
073
074    public void setName(final String name) {
075        this.name = name;
076    }
077
078    @Override
079    public boolean equals(Object o) {
080        if (this == o)
081            return true;
082
083        if (o == null || getClass() != o.getClass())
084            return false;
085
086        BusinessUnitLabelImpl that = (BusinessUnitLabelImpl) o;
087
088        return new EqualsBuilder().append(type, that.type)
089                .append(key, that.key)
090                .append(name, that.name)
091                .append(type, that.type)
092                .append(key, that.key)
093                .append(name, that.name)
094                .isEquals();
095    }
096
097    @Override
098    public int hashCode() {
099        return new HashCodeBuilder(17, 37).append(type).append(key).append(name).toHashCode();
100    }
101
102}