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 * CustomObjectLabel
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class CustomObjectLabelImpl implements CustomObjectLabel, ModelBase {
022
023    private String type;
024
025    private String key;
026
027    private String container;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    CustomObjectLabelImpl(@JsonProperty("key") final String key, @JsonProperty("container") final String container) {
034        this.key = key;
035        this.container = container;
036        this.type = CUSTOM_OBJECT_LABEL;
037    }
038
039    /**
040     * create empty instance
041     */
042    public CustomObjectLabelImpl() {
043        this.type = CUSTOM_OBJECT_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 CustomObject within the defined <code>container</code>.</p>
056     */
057
058    public String getKey() {
059        return this.key;
060    }
061
062    /**
063     *  <p>Namespace to group Custom Objects.</p>
064     */
065
066    public String getContainer() {
067        return this.container;
068    }
069
070    public void setKey(final String key) {
071        this.key = key;
072    }
073
074    public void setContainer(final String container) {
075        this.container = container;
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        CustomObjectLabelImpl that = (CustomObjectLabelImpl) o;
087
088        return new EqualsBuilder().append(type, that.type)
089                .append(key, that.key)
090                .append(container, that.container)
091                .append(type, that.type)
092                .append(key, that.key)
093                .append(container, that.container)
094                .isEquals();
095    }
096
097    @Override
098    public int hashCode() {
099        return new HashCodeBuilder(17, 37).append(type).append(key).append(container).toHashCode();
100    }
101
102}