001package org.xbib.elasticsearch.action.plugin.jdbc.run;
002
003import org.elasticsearch.action.support.nodes.NodesOperationRequest;
004import org.elasticsearch.common.io.stream.StreamInput;
005import org.elasticsearch.common.io.stream.StreamOutput;
006
007import java.io.IOException;
008
009public class RunRiverRequest extends NodesOperationRequest<RunRiverRequest> {
010
011    private String riverType;
012
013    private String riverName;
014
015    public RunRiverRequest setRiverType(String riverType) {
016        this.riverType = riverType;
017        return this;
018    }
019
020    public String getRiverType() {
021        return riverType;
022    }
023
024    public RunRiverRequest setRiverName(String riverName) {
025        this.riverName = riverName;
026        return this;
027    }
028
029    public String getRiverName() {
030        return riverName;
031    }
032
033    @Override
034    public void readFrom(StreamInput in) throws IOException {
035        super.readFrom(in);
036        this.riverName = in.readString();
037        this.riverType = in.readString();
038    }
039
040    @Override
041    public void writeTo(StreamOutput out) throws IOException {
042        super.writeTo(out);
043        out.writeString(riverName);
044        out.writeString(riverType);
045    }
046}