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

org.rapaio.jupyter.kernel.message.messages.ShellCompleteReply Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package org.rapaio.jupyter.kernel.message.messages;

import java.util.List;
import java.util.Map;

import org.rapaio.jupyter.kernel.message.ContentType;
import org.rapaio.jupyter.kernel.message.MessageType;

import com.google.gson.annotations.SerializedName;

public record ShellCompleteReply(
        @SerializedName("status") String status,
        @SerializedName("matches") List matches,
        @SerializedName("cursor_start") int cursorStart,
        @SerializedName("cursor_end") int cursorEnd,
        @SerializedName("metadata") Map metadata) implements ContentType {

    private static final String STATUS = "ok";

    @Override
    public MessageType type() {
        return MessageType.SHELL_COMPLETE_REPLY;
    }

    public ShellCompleteReply {
        if (!STATUS.equals(status)) {
            throw new IllegalArgumentException();
        }
    }

    public ShellCompleteReply(List matches, int cursorStart, int cursorEnd, Map metadata) {
        this(STATUS, matches, cursorStart, cursorEnd, metadata);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy