org.rapaio.jupyter.kernel.message.messages.ShellCompleteReply Maven / Gradle / Ivy
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);
}
}