com.commercetools.history.models.common.FieldDefinitionImpl 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.common;
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;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* FieldDefinition
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class FieldDefinitionImpl implements FieldDefinition, ModelBase {
private com.commercetools.history.models.common.FieldType type;
private String name;
private com.commercetools.history.models.common.LocalizedString label;
private com.commercetools.history.models.common.TextInputHint inputHint;
/**
* create instance with all properties
*/
@JsonCreator
FieldDefinitionImpl(@JsonProperty("type") final com.commercetools.history.models.common.FieldType type,
@JsonProperty("name") final String name,
@JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label,
@JsonProperty("inputHint") final com.commercetools.history.models.common.TextInputHint inputHint) {
this.type = type;
this.name = name;
this.label = label;
this.inputHint = inputHint;
}
/**
* create empty instance
*/
public FieldDefinitionImpl() {
}
/**
*
*/
public com.commercetools.history.models.common.FieldType getType() {
return this.type;
}
/**
* The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_
) and the hyphen-minus (-
). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.
*/
public String getName() {
return this.name;
}
/**
*
*/
public com.commercetools.history.models.common.LocalizedString getLabel() {
return this.label;
}
/**
*
*/
public com.commercetools.history.models.common.TextInputHint getInputHint() {
return this.inputHint;
}
public void setType(final com.commercetools.history.models.common.FieldType type) {
this.type = type;
}
public void setName(final String name) {
this.name = name;
}
public void setLabel(final com.commercetools.history.models.common.LocalizedString label) {
this.label = label;
}
public void setInputHint(final com.commercetools.history.models.common.TextInputHint inputHint) {
this.inputHint = inputHint;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
FieldDefinitionImpl that = (FieldDefinitionImpl) o;
return new EqualsBuilder().append(type, that.type)
.append(name, that.name)
.append(label, that.label)
.append(inputHint, that.inputHint)
.append(type, that.type)
.append(name, that.name)
.append(label, that.label)
.append(inputHint, that.inputHint)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(type).append(name).append(label).append(inputHint).toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type)
.append("name", name)
.append("label", label)
.append("inputHint", inputHint)
.build();
}
}