io.sphere.sdk.attributes.LocalizedEnumAttributeDefinitionBuilder Maven / Gradle / Ivy
package io.sphere.sdk.attributes;
import io.sphere.sdk.models.LocalizedEnumValue;
import io.sphere.sdk.models.LocalizedStrings;
import java.util.List;
public class LocalizedEnumAttributeDefinitionBuilder extends BaseBuilder {
private final List values;
LocalizedEnumAttributeDefinitionBuilder(final String name, final LocalizedStrings label, final List values) {
super(name, label);
this.values = values;
}
@Override
protected LocalizedEnumAttributeDefinitionBuilder getThis() {
return this;
}
@Override
public LocalizedEnumAttributeDefinition build() {
return new LocalizedEnumAttributeDefinition(new LocalizedEnumType(values), getName(), getLabel(), isRequired(), getAttributeConstraint(), isSearchable());
}
public static LocalizedEnumAttributeDefinitionBuilder of(final String name, final LocalizedStrings label, final List values) {
return new LocalizedEnumAttributeDefinitionBuilder(name, label, values);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy