com.commercetools.history.models.change_value.AttributeValueImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commercetools-sdk-java-history Show documentation
Show all versions of commercetools-sdk-java-history Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
package com.commercetools.history.models.change_value;
import java.time.*;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.*;
import io.vrap.rmf.base.client.ModelBase;
import io.vrap.rmf.base.client.utils.Generated;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
/**
* AttributeValue
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class AttributeValueImpl implements AttributeValue, ModelBase {
private String name;
private java.lang.Object value;
/**
* create instance with all properties
*/
@JsonCreator
AttributeValueImpl(@JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) {
this.name = name;
this.value = value;
}
/**
* create empty instance
*/
public AttributeValueImpl() {
}
/**
* Name of the Attribute set.
*/
public String getName() {
return this.name;
}
/**
* Value set for the Attribute determined by the AttributeType:
*
* - For Enum Type and Localized Enum Type,
value
is the key
of the Plain Enum Value or Localized Enum Value objects, or the complete objects.
* - For Localizable Text Type,
value
is the LocalizedString object.
* - For Money Type Attributes,
value
is the Money object.
* - For Set Type Attributes,
value
is the entire set
object.
* - For Nested Type Attributes,
value
is the list of values of all Attributes of the nested Product.
* - For Reference Type Attributes,
value
is the Reference object.
*
*/
public java.lang.Object getValue() {
return this.value;
}
public void setName(final String name) {
this.name = name;
}
public void setValue(final java.lang.Object value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
AttributeValueImpl that = (AttributeValueImpl) o;
return new EqualsBuilder().append(name, that.name)
.append(value, that.value)
.append(name, that.name)
.append(value, that.value)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(name).append(value).toHashCode();
}
}