"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.MarketParam = void 0;
const _m0 = __importStar(require("protobufjs/minimal"));
function createBaseMarketParam() {
    return {
        id: 0,
        pair: "",
        exponent: 0,
        minExchanges: 0,
        minPriceChangePpm: 0,
        exchangeConfigJson: ""
    };
}
exports.MarketParam = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.id !== 0) {
            writer.uint32(8).uint32(message.id);
        }
        if (message.pair !== "") {
            writer.uint32(18).string(message.pair);
        }
        if (message.exponent !== 0) {
            writer.uint32(24).sint32(message.exponent);
        }
        if (message.minExchanges !== 0) {
            writer.uint32(32).uint32(message.minExchanges);
        }
        if (message.minPriceChangePpm !== 0) {
            writer.uint32(40).uint32(message.minPriceChangePpm);
        }
        if (message.exchangeConfigJson !== "") {
            writer.uint32(50).string(message.exchangeConfigJson);
        }
        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 = createBaseMarketParam();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.id = reader.uint32();
                    break;
                case 2:
                    message.pair = reader.string();
                    break;
                case 3:
                    message.exponent = reader.sint32();
                    break;
                case 4:
                    message.minExchanges = reader.uint32();
                    break;
                case 5:
                    message.minPriceChangePpm = reader.uint32();
                    break;
                case 6:
                    message.exchangeConfigJson = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        var _a, _b, _c, _d, _e, _f;
        const message = createBaseMarketParam();
        message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
        message.pair = (_b = object.pair) !== null && _b !== void 0 ? _b : "";
        message.exponent = (_c = object.exponent) !== null && _c !== void 0 ? _c : 0;
        message.minExchanges = (_d = object.minExchanges) !== null && _d !== void 0 ? _d : 0;
        message.minPriceChangePpm = (_e = object.minPriceChangePpm) !== null && _e !== void 0 ? _e : 0;
        message.exchangeConfigJson = (_f = object.exchangeConfigJson) !== null && _f !== void 0 ? _f : "";
        return message;
    }
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFya2V0X3BhcmFtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL0ByaXRiaXQvdjQtcHJvdG8vc3JjL2NvZGVnZW4vcml0Yml0L3ByaWNlcy9tYXJrZXRfcGFyYW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsd0RBQTBDO0FBb0UxQyxTQUFTLHFCQUFxQjtJQUM1QixPQUFPO1FBQ0w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