All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.attributes.LocalizedEnumAttributeDefinitionBuilder Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show newest version
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