001
002package com.commercetools.history.models.change_value;
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>Only present if <code>expand</code> is set to <code>true</code>.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class CustomFieldExpandedValueImpl implements CustomFieldExpandedValue, ModelBase {
022
023    private String name;
024
025    private java.lang.Object value;
026
027    private com.commercetools.history.models.common.LocalizedString label;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    CustomFieldExpandedValueImpl(@JsonProperty("name") final String name,
034            @JsonProperty("value") final java.lang.Object value,
035            @JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label) {
036        this.name = name;
037        this.value = value;
038        this.label = label;
039    }
040
041    /**
042     * create empty instance
043     */
044    public CustomFieldExpandedValueImpl() {
045    }
046
047    /**
048     *  <p>Name of the Custom Field.</p>
049     */
050
051    public String getName() {
052        return this.name;
053    }
054
055    /**
056     *  <p>CustomFieldValue based on the FieldType.</p>
057     */
058
059    public java.lang.Object getValue() {
060        return this.value;
061    }
062
063    /**
064     *  <p>User-defined label of the Custom Field.</p>
065     */
066
067    public com.commercetools.history.models.common.LocalizedString getLabel() {
068        return this.label;
069    }
070
071    public void setName(final String name) {
072        this.name = name;
073    }
074
075    public void setValue(final java.lang.Object value) {
076        this.value = value;
077    }
078
079    public void setLabel(final com.commercetools.history.models.common.LocalizedString label) {
080        this.label = label;
081    }
082
083    @Override
084    public boolean equals(Object o) {
085        if (this == o)
086            return true;
087
088        if (o == null || getClass() != o.getClass())
089            return false;
090
091        CustomFieldExpandedValueImpl that = (CustomFieldExpandedValueImpl) o;
092
093        return new EqualsBuilder().append(name, that.name)
094                .append(value, that.value)
095                .append(label, that.label)
096                .append(name, that.name)
097                .append(value, that.value)
098                .append(label, that.label)
099                .isEquals();
100    }
101
102    @Override
103    public int hashCode() {
104        return new HashCodeBuilder(17, 37).append(name).append(value).append(label).toHashCode();
105    }
106
107}