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

org.dflib.jjava.jupyter.messages.reply.CompleteReply Maven / Gradle / Ivy

The newest version!
package org.dflib.jjava.jupyter.messages.reply;

import com.google.gson.annotations.SerializedName;
import org.dflib.jjava.jupyter.messages.ContentType;
import org.dflib.jjava.jupyter.messages.MessageType;
import org.dflib.jjava.jupyter.messages.ReplyType;
import org.dflib.jjava.jupyter.messages.request.CompleteRequest;

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

public class CompleteReply implements ContentType, ReplyType {
    public static final MessageType MESSAGE_TYPE = MessageType.COMPLETE_REPLY;
    public static final MessageType REQUEST_MESSAGE_TYPE = MessageType.COMPLETE_REQUEST;

    @Override
    public MessageType getType() {
        return MESSAGE_TYPE;
    }

    @Override
    public MessageType getRequestType() {
        return REQUEST_MESSAGE_TYPE;
    }

    protected final String status = "ok";

    protected final List matches;

    /**
     * The starting position in the request's code to replace with a match
     */
    @SerializedName("cursor_start")
    protected final int cursorStart;

    /**
     * The end position in the request's code to replace with a match
     */
    @SerializedName("cursor_end")
    protected final int cursorEnd;

    protected final Map metadata;

    public CompleteReply(List matches, int cursorStart, int cursorEnd, Map metadata) {
        this.matches = matches;
        this.cursorStart = cursorStart;
        this.cursorEnd = cursorEnd;
        this.metadata = metadata;
    }

    public String getStatus() {
        return status;
    }

    public List getMatches() {
        return matches;
    }

    public int getCursorStart() {
        return cursorStart;
    }

    public int getCursorEnd() {
        return cursorEnd;
    }

    public Map getMetadata() {
        return metadata;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy