package eu.jonahbauer.wizard.common.messages.server;

import eu.jonahbauer.wizard.common.messages.data.SessionData;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;
import org.jetbrains.annotations.Unmodifiable;

import java.util.List;

@Getter
@EqualsAndHashCode(callSuper = true)
public final class SessionListMessage extends ServerMessage implements Response {
    /**
     * List of available sessions
     */
    private final @Unmodifiable @NonNull List<@NonNull SessionData> sessions;

    public SessionListMessage(@NonNull List<@NonNull SessionData> sessions) {
        this.sessions = List.copyOf(sessions);
    }
}
