"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const light_1 = require("protobufjs/light");
const protobuf_1 = require("../../protobuf");
const skipblock_1 = require("../../skipchain/skipblock");
class StreamingRequest extends light_1.Message {
    /**
     * @see README#Message classes
     */
    static register() {
        protobuf_1.registerMessage("StreamingRequest", StreamingRequest);
    }
}
exports.StreamingRequest = StreamingRequest;
class StreamingResponse extends light_1.Message {
    /**
     * @see README#Message classes
     */
    static register() {
        protobuf_1.registerMessage("StreamingResponse", StreamingResponse, skipblock_1.SkipBlock);
    }
}
exports.StreamingResponse = StreamingResponse;
class PaginateRequest extends light_1.Message {
    constructor(props) {
        super(props);
        this.startid = Buffer.from(this.startid || protobuf_1.EMPTY_BUFFER);
        this.pagesize = this.pagesize || 0;
        this.numpages = this.numpages || 0;
        this.backward = this.backward || false;
    }
    /**
     * @see README#Message classes
     */
    static register() {
        protobuf_1.registerMessage("PaginateRequest", PaginateRequest);
    }
}
exports.PaginateRequest = PaginateRequest;
class PaginateResponse extends light_1.Message {
    constructor(props) {
        super(props);
        this.blocks = this.blocks || [];
        this.pagenumber = this.pagenumber || 0;
        this.backward = this.backward || false;
        this.errorcode = this.errorcode || 0;
        this.errortext = this.errortext || [];
    }
    /**
     * @see README#Message classes
     */
    static register() {
        protobuf_1.registerMessage("PaginateResponse", PaginateResponse, skipblock_1.SkipBlock);
    }
}
exports.PaginateResponse = PaginateResponse;
StreamingRequest.register();
StreamingResponse.register();
PaginateRequest.register();
PaginateResponse.register();
