"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Params = void 0;
const _m0 = __importStar(require("protobufjs/minimal"));
function createBaseParams() {
    return {
        fundingRateClampFactorPpm: 0,
        premiumVoteClampFactorPpm: 0,
        minNumVotesPerSample: 0
    };
}
exports.Params = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.fundingRateClampFactorPpm !== 0) {
            writer.uint32(8).uint32(message.fundingRateClampFactorPpm);
        }
        if (message.premiumVoteClampFactorPpm !== 0) {
            writer.uint32(16).uint32(message.premiumVoteClampFactorPpm);
        }
        if (message.minNumVotesPerSample !== 0) {
            writer.uint32(24).uint32(message.minNumVotesPerSample);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseParams();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.fundingRateClampFactorPpm = reader.uint32();
                    break;
                case 2:
                    message.premiumVoteClampFactorPpm = reader.uint32();
                    break;
                case 3:
                    message.minNumVotesPerSample = reader.uint32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        var _a, _b, _c;
        const message = createBaseParams();
        message.fundingRateClampFactorPpm = (_a = object.fundingRateClampFactorPpm) !== null && _a !== void 0 ? _a : 0;
        message.premiumVoteClampFactorPpm = (_b = object.premiumVoteClampFactorPpm) !== null && _b !== void 0 ? _b : 0;
        message.minNumVotesPerSample = (_c = object.minNumVotesPerSample) !== null && _c !== void 0 ? _c : 0;
        return message;
    }
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL0ByaXRiaXQvdjQtcHJvdG8vc3JjL2NvZGVnZW4vcml0Yml0L3BlcnBldHVhbHMvcGFyYW1zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHdEQUEwQztBQWlDMUMsU0FBUyxnQkFBZ0I7SUFDdkIsT0FBTztRQUNMLHlCQUF5QixFQUFFLENBQUM7UUFDNUIseUJBQXlCLEVBQUUsQ0FBQztRQUM1QixvQkFBb0IsRUFBRSxDQUFDO0tBQ3hCLENBQUM7QUFDSixDQUFDO0FBRVksUUFBQSxNQUFNLEdBQUc7SUFDcEIsTUFBTSxDQUFDLE9BQWUsRUFBRSxTQUFxQixHQUFHLENBQUMsTUFBTSxDQUFDLE1BQU0sRUFBRTtRQUM5RCxJQUFJLE9BQU8sQ0FBQyx5QkFBeUIsS0FBSyx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