"use strict";

var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CreateSpotMarketOrderAuthz = exports.CreateSpotLimitOrderAuthz = exports.CreateDerivativeMarketOrderAuthz = exports.CreateDerivativeLimitOrderAuthz = exports.CancelSpotOrderAuthz = exports.CancelDerivativeOrderAuthz = exports.BatchUpdateOrdersAuthz = exports.BatchCreateSpotLimitOrdersAuthz = exports.BatchCreateDerivativeLimitOrdersAuthz = exports.BatchCancelSpotOrdersAuthz = exports.BatchCancelDerivativeOrdersAuthz = void 0;
var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function createBaseCreateSpotLimitOrderAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var CreateSpotLimitOrderAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator = _createForOfIteratorHelper(message.marketIds),
      _step;
    try {
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        var v = _step.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseCreateSpotLimitOrderAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId, _object$marketIds;
    var message = createBaseCreateSpotLimitOrderAuthz();
    message.subaccountId = (_object$subaccountId = object.subaccountId) !== null && _object$subaccountId !== void 0 ? _object$subaccountId : "";
    message.marketIds = ((_object$marketIds = object.marketIds) === null || _object$marketIds === void 0 ? void 0 : _object$marketIds.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.CreateSpotLimitOrderAuthz = CreateSpotLimitOrderAuthz;
function createBaseCreateSpotMarketOrderAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var CreateSpotMarketOrderAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator2 = _createForOfIteratorHelper(message.marketIds),
      _step2;
    try {
      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
        var v = _step2.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator2.e(err);
    } finally {
      _iterator2.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseCreateSpotMarketOrderAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId2, _object$marketIds2;
    var message = createBaseCreateSpotMarketOrderAuthz();
    message.subaccountId = (_object$subaccountId2 = object.subaccountId) !== null && _object$subaccountId2 !== void 0 ? _object$subaccountId2 : "";
    message.marketIds = ((_object$marketIds2 = object.marketIds) === null || _object$marketIds2 === void 0 ? void 0 : _object$marketIds2.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.CreateSpotMarketOrderAuthz = CreateSpotMarketOrderAuthz;
function createBaseBatchCreateSpotLimitOrdersAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var BatchCreateSpotLimitOrdersAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator3 = _createForOfIteratorHelper(message.marketIds),
      _step3;
    try {
      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
        var v = _step3.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator3.e(err);
    } finally {
      _iterator3.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseBatchCreateSpotLimitOrdersAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId3, _object$marketIds3;
    var message = createBaseBatchCreateSpotLimitOrdersAuthz();
    message.subaccountId = (_object$subaccountId3 = object.subaccountId) !== null && _object$subaccountId3 !== void 0 ? _object$subaccountId3 : "";
    message.marketIds = ((_object$marketIds3 = object.marketIds) === null || _object$marketIds3 === void 0 ? void 0 : _object$marketIds3.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.BatchCreateSpotLimitOrdersAuthz = BatchCreateSpotLimitOrdersAuthz;
function createBaseCancelSpotOrderAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var CancelSpotOrderAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator4 = _createForOfIteratorHelper(message.marketIds),
      _step4;
    try {
      for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
        var v = _step4.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator4.e(err);
    } finally {
      _iterator4.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseCancelSpotOrderAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId4, _object$marketIds4;
    var message = createBaseCancelSpotOrderAuthz();
    message.subaccountId = (_object$subaccountId4 = object.subaccountId) !== null && _object$subaccountId4 !== void 0 ? _object$subaccountId4 : "";
    message.marketIds = ((_object$marketIds4 = object.marketIds) === null || _object$marketIds4 === void 0 ? void 0 : _object$marketIds4.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.CancelSpotOrderAuthz = CancelSpotOrderAuthz;
function createBaseBatchCancelSpotOrdersAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var BatchCancelSpotOrdersAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator5 = _createForOfIteratorHelper(message.marketIds),
      _step5;
    try {
      for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
        var v = _step5.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator5.e(err);
    } finally {
      _iterator5.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseBatchCancelSpotOrdersAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId5, _object$marketIds5;
    var message = createBaseBatchCancelSpotOrdersAuthz();
    message.subaccountId = (_object$subaccountId5 = object.subaccountId) !== null && _object$subaccountId5 !== void 0 ? _object$subaccountId5 : "";
    message.marketIds = ((_object$marketIds5 = object.marketIds) === null || _object$marketIds5 === void 0 ? void 0 : _object$marketIds5.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.BatchCancelSpotOrdersAuthz = BatchCancelSpotOrdersAuthz;
function createBaseCreateDerivativeLimitOrderAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var CreateDerivativeLimitOrderAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator6 = _createForOfIteratorHelper(message.marketIds),
      _step6;
    try {
      for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
        var v = _step6.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator6.e(err);
    } finally {
      _iterator6.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseCreateDerivativeLimitOrderAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId6, _object$marketIds6;
    var message = createBaseCreateDerivativeLimitOrderAuthz();
    message.subaccountId = (_object$subaccountId6 = object.subaccountId) !== null && _object$subaccountId6 !== void 0 ? _object$subaccountId6 : "";
    message.marketIds = ((_object$marketIds6 = object.marketIds) === null || _object$marketIds6 === void 0 ? void 0 : _object$marketIds6.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.CreateDerivativeLimitOrderAuthz = CreateDerivativeLimitOrderAuthz;
function createBaseCreateDerivativeMarketOrderAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var CreateDerivativeMarketOrderAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator7 = _createForOfIteratorHelper(message.marketIds),
      _step7;
    try {
      for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
        var v = _step7.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator7.e(err);
    } finally {
      _iterator7.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseCreateDerivativeMarketOrderAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId7, _object$marketIds7;
    var message = createBaseCreateDerivativeMarketOrderAuthz();
    message.subaccountId = (_object$subaccountId7 = object.subaccountId) !== null && _object$subaccountId7 !== void 0 ? _object$subaccountId7 : "";
    message.marketIds = ((_object$marketIds7 = object.marketIds) === null || _object$marketIds7 === void 0 ? void 0 : _object$marketIds7.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.CreateDerivativeMarketOrderAuthz = CreateDerivativeMarketOrderAuthz;
function createBaseBatchCreateDerivativeLimitOrdersAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var BatchCreateDerivativeLimitOrdersAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator8 = _createForOfIteratorHelper(message.marketIds),
      _step8;
    try {
      for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
        var v = _step8.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator8.e(err);
    } finally {
      _iterator8.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseBatchCreateDerivativeLimitOrdersAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId8, _object$marketIds8;
    var message = createBaseBatchCreateDerivativeLimitOrdersAuthz();
    message.subaccountId = (_object$subaccountId8 = object.subaccountId) !== null && _object$subaccountId8 !== void 0 ? _object$subaccountId8 : "";
    message.marketIds = ((_object$marketIds8 = object.marketIds) === null || _object$marketIds8 === void 0 ? void 0 : _object$marketIds8.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.BatchCreateDerivativeLimitOrdersAuthz = BatchCreateDerivativeLimitOrdersAuthz;
function createBaseCancelDerivativeOrderAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var CancelDerivativeOrderAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator9 = _createForOfIteratorHelper(message.marketIds),
      _step9;
    try {
      for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
        var v = _step9.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator9.e(err);
    } finally {
      _iterator9.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseCancelDerivativeOrderAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId9, _object$marketIds9;
    var message = createBaseCancelDerivativeOrderAuthz();
    message.subaccountId = (_object$subaccountId9 = object.subaccountId) !== null && _object$subaccountId9 !== void 0 ? _object$subaccountId9 : "";
    message.marketIds = ((_object$marketIds9 = object.marketIds) === null || _object$marketIds9 === void 0 ? void 0 : _object$marketIds9.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.CancelDerivativeOrderAuthz = CancelDerivativeOrderAuthz;
function createBaseBatchCancelDerivativeOrdersAuthz() {
  return {
    subaccountId: "",
    marketIds: []
  };
}
var BatchCancelDerivativeOrdersAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator10 = _createForOfIteratorHelper(message.marketIds),
      _step10;
    try {
      for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
        var v = _step10.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator10.e(err);
    } finally {
      _iterator10.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseBatchCancelDerivativeOrdersAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.marketIds.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId10, _object$marketIds10;
    var message = createBaseBatchCancelDerivativeOrdersAuthz();
    message.subaccountId = (_object$subaccountId10 = object.subaccountId) !== null && _object$subaccountId10 !== void 0 ? _object$subaccountId10 : "";
    message.marketIds = ((_object$marketIds10 = object.marketIds) === null || _object$marketIds10 === void 0 ? void 0 : _object$marketIds10.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.BatchCancelDerivativeOrdersAuthz = BatchCancelDerivativeOrdersAuthz;
function createBaseBatchUpdateOrdersAuthz() {
  return {
    subaccountId: "",
    spotMarkets: [],
    derivativeMarkets: []
  };
}
var BatchUpdateOrdersAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.subaccountId !== "") {
      writer.uint32(10).string(message.subaccountId);
    }
    var _iterator11 = _createForOfIteratorHelper(message.spotMarkets),
      _step11;
    try {
      for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
        var v = _step11.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator11.e(err);
    } finally {
      _iterator11.f();
    }
    var _iterator12 = _createForOfIteratorHelper(message.derivativeMarkets),
      _step12;
    try {
      for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
        var _v = _step12.value;
        writer.uint32(26).string(_v);
      }
    } catch (err) {
      _iterator12.e(err);
    } finally {
      _iterator12.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseBatchUpdateOrdersAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.subaccountId = reader.string();
          break;
        case 2:
          message.spotMarkets.push(reader.string());
          break;
        case 3:
          message.derivativeMarkets.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$subaccountId11, _object$spotMarkets, _object$derivativeMar;
    var message = createBaseBatchUpdateOrdersAuthz();
    message.subaccountId = (_object$subaccountId11 = object.subaccountId) !== null && _object$subaccountId11 !== void 0 ? _object$subaccountId11 : "";
    message.spotMarkets = ((_object$spotMarkets = object.spotMarkets) === null || _object$spotMarkets === void 0 ? void 0 : _object$spotMarkets.map(function (e) {
      return e;
    })) || [];
    message.derivativeMarkets = ((_object$derivativeMar = object.derivativeMarkets) === null || _object$derivativeMar === void 0 ? void 0 : _object$derivativeMar.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.BatchUpdateOrdersAuthz = BatchUpdateOrdersAuthz;