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

io.sphere.sdk.states.StateImpl Maven / Gradle / Ivy

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


import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.LocalizedString;
import io.sphere.sdk.models.ResourceImpl;
import io.sphere.sdk.models.Reference;

import javax.annotation.Nullable;
import java.time.ZonedDateTime;
import java.util.Set;

final class StateImpl extends ResourceImpl implements State {
    private final String key;
    private final StateType type;
    @Nullable
    private final LocalizedString name;
    @Nullable
    private final LocalizedString description;
    private final Boolean initial;
    private final Boolean builtIn;
    @Nullable
    private final Set> transitions;

    @JsonCreator
    public StateImpl(String id, Long version, ZonedDateTime createdAt, ZonedDateTime lastModifiedAt, String key, StateType type,
                     LocalizedString name, LocalizedString description, Boolean initial,
                     Boolean builtIn, Set> transitions) {
        super(id, version, createdAt, lastModifiedAt);
        this.key = key;
        this.type = type;
        this.name = name;
        this.description = description;
        this.initial = initial;
        this.builtIn = builtIn;
        this.transitions = transitions;
    }

    public String getKey() {
        return key;
    }

    public StateType getType() {
        return type;
    }

    @Nullable
    public LocalizedString getName() {
        return name;
    }

    @Nullable
    public LocalizedString getDescription() {
        return description;
    }

    public Boolean isInitial() {
        return initial;
    }

    public Boolean isBuiltIn() {
        return builtIn;
    }

    @Nullable
    public Set> getTransitions() {
        return transitions;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy