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

io.sphere.sdk.products.attributes.AttributeConstraint Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.products.attributes;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.SphereEnumeration;

public enum AttributeConstraint implements SphereEnumeration {
    /**
     * No constraints are applied to the attribute.
     */
    NONE,
    /**
     * Attribute value should be different in each variant.
     */
    UNIQUE,
    /**
     * A set of attributes, that have this constraint, should have different combinations in each variant.
     */
    COMBINATION_UNIQUE,
    /**
     * Attribute value should be the same in all variants
     */
    SAME_FOR_ALL;

    @JsonCreator
    public static AttributeConstraint ofSphereValue(final String value) {
        return SphereEnumeration.findBySphereName(values(), value).get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy